JunkBox_Lib++ (for Windows)
1.10.1
Loading...
Searching...
No Matches
dh_tool.h
Go to the documentation of this file.
1
#ifndef __JBXL_DH_TOOL_H_
2
#define __JBXL_DH_TOOL_H_
3
4
#include "
xtools.h
"
5
#include "
asn1_tool.h
"
6
7
#ifndef HAVE_OPENSSL_SSL_H
8
#ifndef DISABLE_SSL
9
#define DISABLE_SSL
10
#endif
11
#endif
12
13
#ifdef DISABLE_SSL
14
#undef ENABLE_SSL
15
#endif
16
17
18
#ifdef ENABLE_SSL
19
20
35
#include <openssl/crypto.h>
36
#include <openssl/x509.h>
37
#include <openssl/pem.h>
38
#include <openssl/err.h>
39
40
#include <openssl/ssl.h>
41
#include <openssl/evp.h>
42
#include <openssl/rand.h>
43
44
45
#ifdef WIN32
46
#pragma comment(lib, "openssl.lib")
47
#endif
48
49
50
// Diffie-Hellman
51
int
save_DHspki_with_private(
Buffer
pki, FILE* fp, DH* dhkey);
52
Buffer
read_DHspki_with_private(FILE* fp, DH** p_dhkey);
53
54
Buffer
get_DHspki_ff(
char
* fn,
int
sz, DH** p_dhkey);
55
#define get_DHspki_file(p, s, d) get_DHspki_ff((p), (s), (d))
56
57
Buffer
gen_DHspki(
int
sz, DH** p_dhkey);
58
Buffer
gen_DHspki_fs(
Buffer
pki, DH** p_dhkey);
59
60
Buffer
get_DHsharedkey (
Buffer
pki, DH* dhkey);
61
Buffer
get_DHsharedkey_fY(
Buffer
ykey, DH* dhkey);
62
63
Buffer
get_DHYkey(
Buffer
param);
64
Buffer
get_DHPkey(
Buffer
param);
65
Buffer
get_DHGkey(
Buffer
param);
66
Buffer
get_DHalgorism(
Buffer
param);
67
Buffer
get_DHprivatekey(DH* dhkey);
68
69
Buffer
join_DHpubkey(
Buffer
param,
Buffer
key);
70
71
72
#endif
// DISABLE_SSL
73
74
#endif
// __JBXL_SSL_TOOL_H_
75
asn1_tool.h
ASN.1/DER 用ライブラリヘッダ
Buffer
Definition
buffer.h:35
xtools.h
汎用拡張ツールヘッダ
ExtendLib
xLib
dh_tool.h
Generated on Sat Oct 12 2024 19:42:08 for JunkBox_Lib++ (for Windows) by
1.11.0