source: UsbWattMeter/trunk/wolfssl-3.7.0/wolfssl/openssl/dh.h@ 164

Last change on this file since 164 was 164, checked in by coas-nagasima, 8 years ago

TOPPERS/ECNLサンプルアプリ「USB充電器電力計」を追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 1.4 KB
Line 
1/* dh.h for openSSL */
2
3
4#ifndef WOLFSSL_DH_H_
5#define WOLFSSL_DH_H_
6
7#include <wolfssl/openssl/ssl.h>
8#include <wolfssl/openssl/bn.h>
9
10#ifdef __cplusplus
11 extern "C" {
12#endif
13
14struct WOLFSSL_DH {
15 WOLFSSL_BIGNUM* p;
16 WOLFSSL_BIGNUM* g;
17 WOLFSSL_BIGNUM* pub_key; /* openssh deference g^x */
18 WOLFSSL_BIGNUM* priv_key; /* openssh deference x */
19 void* internal; /* our DH */
20 char inSet; /* internal set from external ? */
21 char exSet; /* external set from internal ? */
22 /*added for lighttpd openssl compatability, go back and add a getter in
23 * lighttpd src code.
24 */
25 int length;
26};
27
28
29WOLFSSL_API WOLFSSL_DH* wolfSSL_DH_new(void);
30WOLFSSL_API void wolfSSL_DH_free(WOLFSSL_DH*);
31
32WOLFSSL_API int wolfSSL_DH_size(WOLFSSL_DH*);
33WOLFSSL_API int wolfSSL_DH_generate_key(WOLFSSL_DH*);
34WOLFSSL_API int wolfSSL_DH_compute_key(unsigned char* key, WOLFSSL_BIGNUM* pub,
35 WOLFSSL_DH*);
36
37typedef WOLFSSL_DH DH;
38
39#define DH_new wolfSSL_DH_new
40#define DH_free wolfSSL_DH_free
41
42#define DH_size wolfSSL_DH_size
43#define DH_generate_key wolfSSL_DH_generate_key
44#define DH_compute_key wolfSSL_DH_compute_key
45
46
47#ifdef __cplusplus
48 } /* extern "C" */
49#endif
50
51#ifdef HAVE_STUNNEL
52#define DH_generate_parameters wolfSSL_DH_generate_parameters
53#endif /* HAVE_STUNNEL */
54#endif /* header */
Note: See TracBrowser for help on using the repository browser.