wolfssl/cyassl/openssl/dh.h

53 lines
1.1 KiB
C
Raw Normal View History

2012-04-27 03:27:27 +04:00
/* dh.h for openSSL */
2011-02-05 22:14:47 +03:00
2012-04-27 03:27:27 +04:00
#ifndef CYASSL_DH_H_
#define CYASSL_DH_H_
#include <cyassl/openssl/ssl.h>
#include <cyassl/openssl/bn.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct CYASSL_DH {
2012-05-02 03:12:12 +04:00
CYASSL_BIGNUM* p;
CYASSL_BIGNUM* g;
CYASSL_BIGNUM* pub_key; /* openssh deference g^x */
CYASSL_BIGNUM* priv_key; /* openssh deference x */
2012-05-08 03:35:23 +04:00
void* internal; /* our DH */
char inSet; /* internal set from external ? */
char exSet; /* external set from internal ? */
2012-04-27 03:27:27 +04:00
} CYASSL_DH;
2012-05-02 03:12:12 +04:00
CYASSL_API CYASSL_DH* CyaSSL_DH_new(void);
CYASSL_API void CyaSSL_DH_free(CYASSL_DH*);
CYASSL_API int CyaSSL_DH_size(CYASSL_DH*);
CYASSL_API int CyaSSL_DH_generate_key(CYASSL_DH*);
CYASSL_API int CyaSSL_DH_compute_key(unsigned char* key, CYASSL_BIGNUM* pub,
CYASSL_DH*);
2012-04-27 03:27:27 +04:00
typedef CYASSL_DH DH;
2012-05-02 03:12:12 +04:00
#define DH_new CyaSSL_DH_new
#define DH_free CyaSSL_DH_free
#define DH_size CyaSSL_DH_size
#define DH_generate_key CyaSSL_DH_generate_key
#define DH_compute_key CyaSSL_DH_compute_key
2012-04-27 03:27:27 +04:00
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* header */