CyaSSL 3.0.0

Dependents:   HTTPClient-SSL HTTPClient HTTPClient-SSL http_access ... more

Committer:
wolfSSL
Date:
Wed Dec 03 05:24:18 2014 +0000
Revision:
3:64d4f7cb83d5
Parent:
0:1239e9b70ca2
added IGNORE_KEY_EXTENSIONS

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wolfSSL 0:1239e9b70ca2 1 /* dh.h for openSSL */
wolfSSL 0:1239e9b70ca2 2
wolfSSL 0:1239e9b70ca2 3
wolfSSL 0:1239e9b70ca2 4 #ifndef CYASSL_DH_H_
wolfSSL 0:1239e9b70ca2 5 #define CYASSL_DH_H_
wolfSSL 0:1239e9b70ca2 6
wolfSSL 0:1239e9b70ca2 7
wolfSSL 0:1239e9b70ca2 8 #include <cyassl/openssl/ssl.h>
wolfSSL 0:1239e9b70ca2 9 #include <cyassl/openssl/bn.h>
wolfSSL 0:1239e9b70ca2 10
wolfSSL 0:1239e9b70ca2 11
wolfSSL 0:1239e9b70ca2 12 #ifdef __cplusplus
wolfSSL 0:1239e9b70ca2 13 extern "C" {
wolfSSL 0:1239e9b70ca2 14 #endif
wolfSSL 0:1239e9b70ca2 15
wolfSSL 0:1239e9b70ca2 16
wolfSSL 0:1239e9b70ca2 17
wolfSSL 0:1239e9b70ca2 18
wolfSSL 0:1239e9b70ca2 19 typedef struct CYASSL_DH {
wolfSSL 0:1239e9b70ca2 20 CYASSL_BIGNUM* p;
wolfSSL 0:1239e9b70ca2 21 CYASSL_BIGNUM* g;
wolfSSL 0:1239e9b70ca2 22 CYASSL_BIGNUM* pub_key; /* openssh deference g^x */
wolfSSL 0:1239e9b70ca2 23 CYASSL_BIGNUM* priv_key; /* openssh deference x */
wolfSSL 0:1239e9b70ca2 24 void* internal; /* our DH */
wolfSSL 0:1239e9b70ca2 25 char inSet; /* internal set from external ? */
wolfSSL 0:1239e9b70ca2 26 char exSet; /* external set from internal ? */
wolfSSL 0:1239e9b70ca2 27 } CYASSL_DH;
wolfSSL 0:1239e9b70ca2 28
wolfSSL 0:1239e9b70ca2 29
wolfSSL 0:1239e9b70ca2 30 CYASSL_API CYASSL_DH* CyaSSL_DH_new(void);
wolfSSL 0:1239e9b70ca2 31 CYASSL_API void CyaSSL_DH_free(CYASSL_DH*);
wolfSSL 0:1239e9b70ca2 32
wolfSSL 0:1239e9b70ca2 33 CYASSL_API int CyaSSL_DH_size(CYASSL_DH*);
wolfSSL 0:1239e9b70ca2 34 CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*);
wolfSSL 0:1239e9b70ca2 35 CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub,
wolfSSL 0:1239e9b70ca2 36 CYASSL_DH*);
wolfSSL 0:1239e9b70ca2 37
wolfSSL 0:1239e9b70ca2 38 typedef CYASSL_DH DH;
wolfSSL 0:1239e9b70ca2 39
wolfSSL 0:1239e9b70ca2 40 #define DH_new CyaSSL_DH_new
wolfSSL 0:1239e9b70ca2 41 #define DH_free CyaSSL_DH_free
wolfSSL 0:1239e9b70ca2 42
wolfSSL 0:1239e9b70ca2 43 #define DH_size CyaSSL_DH_size
wolfSSL 0:1239e9b70ca2 44 #define DH_generate_key CyaSSL_DH_generate_key
wolfSSL 0:1239e9b70ca2 45 #define DH_compute_key CyaSSL_DH_compute_key
wolfSSL 0:1239e9b70ca2 46
wolfSSL 0:1239e9b70ca2 47
wolfSSL 0:1239e9b70ca2 48 #ifdef __cplusplus
wolfSSL 0:1239e9b70ca2 49 } /* extern "C" */
wolfSSL 0:1239e9b70ca2 50 #endif
wolfSSL 0:1239e9b70ca2 51
wolfSSL 0:1239e9b70ca2 52 #endif /* header */
wolfSSL 0:1239e9b70ca2 53