]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/CyaSSL/cyassl/openssl/dh.h
Final commit before tagging - cosmetic changes only.
[freertos] / FreeRTOS-Plus / Source / CyaSSL / cyassl / openssl / dh.h
1 /* dh.h for openSSL */
2
3
4 #ifndef CYASSL_DH_H_
5 #define CYASSL_DH_H_
6
7
8 #include <cyassl/openssl/ssl.h>
9 #include <cyassl/openssl/bn.h>
10
11
12 #ifdef __cplusplus
13     extern "C" {
14 #endif
15
16
17
18
19 typedef struct CYASSL_DH {
20         CYASSL_BIGNUM* p;
21         CYASSL_BIGNUM* g;
22     CYASSL_BIGNUM* pub_key;      /* openssh deference g^x */
23     CYASSL_BIGNUM* priv_key;     /* openssh deference x   */
24     void*          internal;     /* our DH */
25     char           inSet;        /* internal set from external ? */
26     char           exSet;        /* external set from internal ? */
27 } CYASSL_DH;
28
29
30 CYASSL_API CYASSL_DH* CyaSSL_DH_new(void);
31 CYASSL_API void       CyaSSL_DH_free(CYASSL_DH*);
32
33 CYASSL_API int CyaSSL_DH_size(CYASSL_DH*);
34 CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*);
35 CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub,
36                                      CYASSL_DH*);
37
38 typedef CYASSL_DH DH;
39
40 #define DH_new  CyaSSL_DH_new 
41 #define DH_free CyaSSL_DH_free
42
43 #define DH_size         CyaSSL_DH_size
44 #define DH_generate_key CyaSSL_DH_generate_key
45 #define DH_compute_key  CyaSSL_DH_compute_key
46
47
48 #ifdef __cplusplus
49     }  /* extern "C" */ 
50 #endif
51
52 #endif /* header */