]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/CyaSSL/cyassl/openssl/dsa.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS-Plus / CyaSSL / cyassl / openssl / dsa.h
1 /* dsa.h for openSSL */
2
3
4 #ifndef CYASSL_DSA_H_
5 #define CYASSL_DSA_H_
6
7
8 #include <cyassl/openssl/ssl.h>
9 #include <cyassl/openssl/bn.h>
10
11
12 #ifdef __cplusplus
13     extern "C" {
14 #endif
15
16
17
18 struct CYASSL_DSA {
19         CYASSL_BIGNUM* p;
20         CYASSL_BIGNUM* q;
21         CYASSL_BIGNUM* g;
22         CYASSL_BIGNUM* pub_key;      /* our y */
23         CYASSL_BIGNUM* priv_key;     /* our x */
24     void*          internal;     /* our Dsa Key */
25     char           inSet;        /* internal set from external ? */
26     char           exSet;        /* external set from internal ? */
27 };
28
29
30 CYASSL_API CYASSL_DSA* CyaSSL_DSA_new(void);
31 CYASSL_API void        CyaSSL_DSA_free(CYASSL_DSA*);
32
33 CYASSL_API int CyaSSL_DSA_generate_key(CYASSL_DSA*);
34 CYASSL_API int CyaSSL_DSA_generate_parameters_ex(CYASSL_DSA*, int bits,
35                    unsigned char* seed, int seedLen, int* counterRet,
36                    unsigned long* hRet, void* cb);
37
38 CYASSL_API int CyaSSL_DSA_LoadDer(CYASSL_DSA*, const unsigned char*, int sz);
39 CYASSL_API int CyaSSL_DSA_do_sign(const unsigned char* d, unsigned char* sigRet,
40                                   CYASSL_DSA* dsa);
41
42 #define DSA_new CyaSSL_DSA_new
43 #define DSA_free CyaSSL_DSA_free
44
45 #define DSA_generate_key           CyaSSL_DSA_generate_key
46 #define DSA_generate_parameters_ex CyaSSL_DSA_generate_parameters_ex
47
48
49 #ifdef __cplusplus
50     }  /* extern "C" */ 
51 #endif
52
53 #endif /* header */