Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of wolfSSL by
dh.h
00001 /* dh.h for openSSL */ 00002 00003 00004 #ifndef WOLFSSL_DH_H_ 00005 #define WOLFSSL_DH_H_ 00006 00007 #include <wolfssl/openssl/ssl.h> 00008 #include <wolfssl/openssl/bn.h> 00009 00010 #ifdef __cplusplus 00011 extern "C" { 00012 #endif 00013 00014 struct WOLFSSL_DH { 00015 WOLFSSL_BIGNUM* p; 00016 WOLFSSL_BIGNUM* g; 00017 WOLFSSL_BIGNUM* q; 00018 WOLFSSL_BIGNUM* pub_key; /* openssh deference g^x */ 00019 WOLFSSL_BIGNUM* priv_key; /* openssh deference x */ 00020 void* internal; /* our DH */ 00021 char inSet; /* internal set from external ? */ 00022 char exSet; /* external set from internal ? */ 00023 /*added for lighttpd openssl compatibility, go back and add a getter in 00024 * lighttpd src code. 00025 */ 00026 int length; 00027 }; 00028 00029 00030 WOLFSSL_API WOLFSSL_DH* wolfSSL_DH_new(void); 00031 WOLFSSL_API void wolfSSL_DH_free(WOLFSSL_DH*); 00032 00033 WOLFSSL_API int wolfSSL_DH_size(WOLFSSL_DH*); 00034 WOLFSSL_API int wolfSSL_DH_generate_key(WOLFSSL_DH*); 00035 WOLFSSL_API int wolfSSL_DH_compute_key(unsigned char* key, WOLFSSL_BIGNUM* pub, 00036 WOLFSSL_DH*); 00037 00038 typedef WOLFSSL_DH DH; 00039 00040 #define DH_new wolfSSL_DH_new 00041 #define DH_free wolfSSL_DH_free 00042 00043 #define DH_size wolfSSL_DH_size 00044 #define DH_generate_key wolfSSL_DH_generate_key 00045 #define DH_compute_key wolfSSL_DH_compute_key 00046 00047 00048 #ifdef __cplusplus 00049 } /* extern "C" */ 00050 #endif 00051 00052 #ifdef HAVE_STUNNEL 00053 #define DH_generate_parameters wolfSSL_DH_generate_parameters 00054 #define DH_generate_parameters_ex wolfSSL_DH_generate_parameters_ex 00055 #endif /* HAVE_STUNNEL */ 00056 #endif /* header */ 00057
Generated on Tue Jul 12 2022 23:30:55 by
1.7.2
