SSL/TLS Library
CyaSSL is SSL/TLS library for embedded systems.
cyassl/openssl/dsa.h@0:9d17e4342598, 2014-04-20 (annotated)
- Committer:
- wolfSSL
- Date:
- Sun Apr 20 12:40:57 2014 +0000
- Revision:
- 0:9d17e4342598
CyaSSL SSL/TLS Library 2.9.4;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 0:9d17e4342598 | 1 | /* dsa.h for openSSL */ |
wolfSSL | 0:9d17e4342598 | 2 | |
wolfSSL | 0:9d17e4342598 | 3 | |
wolfSSL | 0:9d17e4342598 | 4 | #ifndef CYASSL_DSA_H_ |
wolfSSL | 0:9d17e4342598 | 5 | #define CYASSL_DSA_H_ |
wolfSSL | 0:9d17e4342598 | 6 | |
wolfSSL | 0:9d17e4342598 | 7 | |
wolfSSL | 0:9d17e4342598 | 8 | #include <cyassl/openssl/ssl.h> |
wolfSSL | 0:9d17e4342598 | 9 | #include <cyassl/openssl/bn.h> |
wolfSSL | 0:9d17e4342598 | 10 | |
wolfSSL | 0:9d17e4342598 | 11 | |
wolfSSL | 0:9d17e4342598 | 12 | #ifdef __cplusplus |
wolfSSL | 0:9d17e4342598 | 13 | extern "C" { |
wolfSSL | 0:9d17e4342598 | 14 | #endif |
wolfSSL | 0:9d17e4342598 | 15 | |
wolfSSL | 0:9d17e4342598 | 16 | |
wolfSSL | 0:9d17e4342598 | 17 | |
wolfSSL | 0:9d17e4342598 | 18 | struct CYASSL_DSA { |
wolfSSL | 0:9d17e4342598 | 19 | CYASSL_BIGNUM* p; |
wolfSSL | 0:9d17e4342598 | 20 | CYASSL_BIGNUM* q; |
wolfSSL | 0:9d17e4342598 | 21 | CYASSL_BIGNUM* g; |
wolfSSL | 0:9d17e4342598 | 22 | CYASSL_BIGNUM* pub_key; /* our y */ |
wolfSSL | 0:9d17e4342598 | 23 | CYASSL_BIGNUM* priv_key; /* our x */ |
wolfSSL | 0:9d17e4342598 | 24 | void* internal; /* our Dsa Key */ |
wolfSSL | 0:9d17e4342598 | 25 | char inSet; /* internal set from external ? */ |
wolfSSL | 0:9d17e4342598 | 26 | char exSet; /* external set from internal ? */ |
wolfSSL | 0:9d17e4342598 | 27 | }; |
wolfSSL | 0:9d17e4342598 | 28 | |
wolfSSL | 0:9d17e4342598 | 29 | |
wolfSSL | 0:9d17e4342598 | 30 | CYASSL_API CYASSL_DSA* CyaSSL_DSA_new(void); |
wolfSSL | 0:9d17e4342598 | 31 | CYASSL_API void CyaSSL_DSA_free(CYASSL_DSA*); |
wolfSSL | 0:9d17e4342598 | 32 | |
wolfSSL | 0:9d17e4342598 | 33 | CYASSL_API int CyaSSL_DSA_generate_key(CYASSL_DSA*); |
wolfSSL | 0:9d17e4342598 | 34 | CYASSL_API int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA*, int bits, |
wolfSSL | 0:9d17e4342598 | 35 | unsigned char* seed, int seedLen, int* counterRet, |
wolfSSL | 0:9d17e4342598 | 36 | unsigned long* hRet, void* cb); |
wolfSSL | 0:9d17e4342598 | 37 | |
wolfSSL | 0:9d17e4342598 | 38 | CYASSL_API int CyaSSL_DSA_LoadDer(CYASSL_DSA*, const unsigned char*, int sz); |
wolfSSL | 0:9d17e4342598 | 39 | CYASSL_API int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet, |
wolfSSL | 0:9d17e4342598 | 40 | CYASSL_DSA* dsa); |
wolfSSL | 0:9d17e4342598 | 41 | |
wolfSSL | 0:9d17e4342598 | 42 | #define DSA_new CyaSSL_DSA_new |
wolfSSL | 0:9d17e4342598 | 43 | #define DSA_free CyaSSL_DSA_free |
wolfSSL | 0:9d17e4342598 | 44 | |
wolfSSL | 0:9d17e4342598 | 45 | #define DSA_generate_key CyaSSL_DSA_generate_key |
wolfSSL | 0:9d17e4342598 | 46 | #define DSA_generate_parameters_ex CyaSSL_DSA_generate_parameters_ex |
wolfSSL | 0:9d17e4342598 | 47 | |
wolfSSL | 0:9d17e4342598 | 48 | |
wolfSSL | 0:9d17e4342598 | 49 | #ifdef __cplusplus |
wolfSSL | 0:9d17e4342598 | 50 | } /* extern "C" */ |
wolfSSL | 0:9d17e4342598 | 51 | #endif |
wolfSSL | 0:9d17e4342598 | 52 | |
wolfSSL | 0:9d17e4342598 | 53 | #endif /* header */ |