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

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?

UserRevisionLine numberNew contents of line
Vanger 0:b86d15c6ba29 1 /* dsa.h for openSSL */
Vanger 0:b86d15c6ba29 2
Vanger 0:b86d15c6ba29 3
Vanger 0:b86d15c6ba29 4 #ifndef CYASSL_DSA_H_
Vanger 0:b86d15c6ba29 5 #define CYASSL_DSA_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 struct CYASSL_DSA {
Vanger 0:b86d15c6ba29 19 CYASSL_BIGNUM* p;
Vanger 0:b86d15c6ba29 20 CYASSL_BIGNUM* q;
Vanger 0:b86d15c6ba29 21 CYASSL_BIGNUM* g;
Vanger 0:b86d15c6ba29 22 CYASSL_BIGNUM* pub_key; /* our y */
Vanger 0:b86d15c6ba29 23 CYASSL_BIGNUM* priv_key; /* our x */
Vanger 0:b86d15c6ba29 24 void* internal; /* our Dsa Key */
Vanger 0:b86d15c6ba29 25 char inSet; /* internal set from external ? */
Vanger 0:b86d15c6ba29 26 char exSet; /* external set from internal ? */
Vanger 0:b86d15c6ba29 27 };
Vanger 0:b86d15c6ba29 28
Vanger 0:b86d15c6ba29 29
Vanger 0:b86d15c6ba29 30 CYASSL_API CYASSL_DSA* CyaSSL_DSA_new(void);
Vanger 0:b86d15c6ba29 31 CYASSL_API void CyaSSL_DSA_free(CYASSL_DSA*);
Vanger 0:b86d15c6ba29 32
Vanger 0:b86d15c6ba29 33 CYASSL_API int CyaSSL_DSA_generate_key(CYASSL_DSA*);
Vanger 0:b86d15c6ba29 34 CYASSL_API int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA*, int bits,
Vanger 0:b86d15c6ba29 35 unsigned char* seed, int seedLen, int* counterRet,
Vanger 0:b86d15c6ba29 36 unsigned long* hRet, void* cb);
Vanger 0:b86d15c6ba29 37
Vanger 0:b86d15c6ba29 38 CYASSL_API int CyaSSL_DSA_LoadDer(CYASSL_DSA*, const unsigned char*, int sz);
Vanger 0:b86d15c6ba29 39 CYASSL_API int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet,
Vanger 0:b86d15c6ba29 40 CYASSL_DSA* dsa);
Vanger 0:b86d15c6ba29 41
Vanger 0:b86d15c6ba29 42 #define DSA_new CyaSSL_DSA_new
Vanger 0:b86d15c6ba29 43 #define DSA_free CyaSSL_DSA_free
Vanger 0:b86d15c6ba29 44
Vanger 0:b86d15c6ba29 45 #define DSA_generate_key CyaSSL_DSA_generate_key
Vanger 0:b86d15c6ba29 46 #define DSA_generate_parameters_ex CyaSSL_DSA_generate_parameters_ex
Vanger 0:b86d15c6ba29 47
Vanger 0:b86d15c6ba29 48
Vanger 0:b86d15c6ba29 49 #ifdef __cplusplus
Vanger 0:b86d15c6ba29 50 } /* extern "C" */
Vanger 0:b86d15c6ba29 51 #endif
Vanger 0:b86d15c6ba29 52
Vanger 0:b86d15c6ba29 53 #endif /* header */