A library for setting up Secure Socket Layer (SSL) connections and verifying remote hosts using certificates. Contains only the source files for mbed platform implementation of the library.
Dependents: HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL
cyassl/openssl/dh.h@0:b86d15c6ba29, 2015-01-19 (annotated)
- Committer:
- Vanger
- Date:
- Mon Jan 19 21:45:42 2015 +0000
- Revision:
- 0:b86d15c6ba29
Updated CyaSSL Library to 3.3.0. Changed Settings and functions to be implemented for mbed platforms
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Vanger | 0:b86d15c6ba29 | 1 | /* dh.h for openSSL */ |
Vanger | 0:b86d15c6ba29 | 2 | |
Vanger | 0:b86d15c6ba29 | 3 | |
Vanger | 0:b86d15c6ba29 | 4 | #ifndef CYASSL_DH_H_ |
Vanger | 0:b86d15c6ba29 | 5 | #define CYASSL_DH_H_ |
Vanger | 0:b86d15c6ba29 | 6 | |
Vanger | 0:b86d15c6ba29 | 7 | |
Vanger | 0:b86d15c6ba29 | 8 | #include <cyassl/openssl/ssl.h> |
Vanger | 0:b86d15c6ba29 | 9 | #include <cyassl/openssl/bn.h> |
Vanger | 0:b86d15c6ba29 | 10 | |
Vanger | 0:b86d15c6ba29 | 11 | |
Vanger | 0:b86d15c6ba29 | 12 | #ifdef __cplusplus |
Vanger | 0:b86d15c6ba29 | 13 | extern "C" { |
Vanger | 0:b86d15c6ba29 | 14 | #endif |
Vanger | 0:b86d15c6ba29 | 15 | |
Vanger | 0:b86d15c6ba29 | 16 | |
Vanger | 0:b86d15c6ba29 | 17 | |
Vanger | 0:b86d15c6ba29 | 18 | |
Vanger | 0:b86d15c6ba29 | 19 | typedef struct CYASSL_DH { |
Vanger | 0:b86d15c6ba29 | 20 | CYASSL_BIGNUM* p; |
Vanger | 0:b86d15c6ba29 | 21 | CYASSL_BIGNUM* g; |
Vanger | 0:b86d15c6ba29 | 22 | CYASSL_BIGNUM* pub_key; /* openssh deference g^x */ |
Vanger | 0:b86d15c6ba29 | 23 | CYASSL_BIGNUM* priv_key; /* openssh deference x */ |
Vanger | 0:b86d15c6ba29 | 24 | void* internal; /* our DH */ |
Vanger | 0:b86d15c6ba29 | 25 | char inSet; /* internal set from external ? */ |
Vanger | 0:b86d15c6ba29 | 26 | char exSet; /* external set from internal ? */ |
Vanger | 0:b86d15c6ba29 | 27 | } CYASSL_DH; |
Vanger | 0:b86d15c6ba29 | 28 | |
Vanger | 0:b86d15c6ba29 | 29 | |
Vanger | 0:b86d15c6ba29 | 30 | CYASSL_API CYASSL_DH* CyaSSL_DH_new(void); |
Vanger | 0:b86d15c6ba29 | 31 | CYASSL_API void CyaSSL_DH_free(CYASSL_DH*); |
Vanger | 0:b86d15c6ba29 | 32 | |
Vanger | 0:b86d15c6ba29 | 33 | CYASSL_API int CyaSSL_DH_size(CYASSL_DH*); |
Vanger | 0:b86d15c6ba29 | 34 | CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*); |
Vanger | 0:b86d15c6ba29 | 35 | CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub, |
Vanger | 0:b86d15c6ba29 | 36 | CYASSL_DH*); |
Vanger | 0:b86d15c6ba29 | 37 | |
Vanger | 0:b86d15c6ba29 | 38 | typedef CYASSL_DH DH; |
Vanger | 0:b86d15c6ba29 | 39 | |
Vanger | 0:b86d15c6ba29 | 40 | #define DH_new CyaSSL_DH_new |
Vanger | 0:b86d15c6ba29 | 41 | #define DH_free CyaSSL_DH_free |
Vanger | 0:b86d15c6ba29 | 42 | |
Vanger | 0:b86d15c6ba29 | 43 | #define DH_size CyaSSL_DH_size |
Vanger | 0:b86d15c6ba29 | 44 | #define DH_generate_key CyaSSL_DH_generate_key |
Vanger | 0:b86d15c6ba29 | 45 | #define DH_compute_key CyaSSL_DH_compute_key |
Vanger | 0:b86d15c6ba29 | 46 | |
Vanger | 0:b86d15c6ba29 | 47 | |
Vanger | 0:b86d15c6ba29 | 48 | #ifdef __cplusplus |
Vanger | 0:b86d15c6ba29 | 49 | } /* extern "C" */ |
Vanger | 0:b86d15c6ba29 | 50 | #endif |
Vanger | 0:b86d15c6ba29 | 51 | |
Vanger | 0:b86d15c6ba29 | 52 | #endif /* header */ |