cyassl re-port with cellular comms, PSK test

Dependencies:   VodafoneUSBModem_bleedingedge2 mbed-rtos mbed-src

Committer:
ashleymills
Date:
Fri Apr 26 16:59:36 2013 +0000
Revision:
1:b211d97b0068
Parent:
0:e979170e02e7
nothing

Who changed what in which revision?

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