summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dh/dh.h')
-rw-r--r--src/lib/libcrypto/dh/dh.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h
index d51dc130f4..0aff7fe21f 100644
--- a/src/lib/libcrypto/dh/dh.h
+++ b/src/lib/libcrypto/dh/dh.h
@@ -130,6 +130,10 @@ struct dh_st
130#define DH_UNABLE_TO_CHECK_GENERATOR 0x04 130#define DH_UNABLE_TO_CHECK_GENERATOR 0x04
131#define DH_NOT_SUITABLE_GENERATOR 0x08 131#define DH_NOT_SUITABLE_GENERATOR 0x08
132 132
133/* DH_check_pub_key error codes */
134#define DH_CHECK_PUBKEY_TOO_SMALL 0x01
135#define DH_CHECK_PUBKEY_TOO_LARGE 0x02
136
133/* primes p where (p-1)/2 is prime too are called "safe"; we define 137/* primes p where (p-1)/2 is prime too are called "safe"; we define
134 this for backward compatibility: */ 138 this for backward compatibility: */
135#define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME 139#define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME
@@ -168,6 +172,7 @@ void *DH_get_ex_data(DH *d, int idx);
168DH * DH_generate_parameters(int prime_len,int generator, 172DH * DH_generate_parameters(int prime_len,int generator,
169 void (*callback)(int,int,void *),void *cb_arg); 173 void (*callback)(int,int,void *),void *cb_arg);
170int DH_check(const DH *dh,int *codes); 174int DH_check(const DH *dh,int *codes);
175int DH_check_pub_key(const DH *dh,const BIGNUM *pub_key, int *codes);
171int DH_generate_key(DH *dh); 176int DH_generate_key(DH *dh);
172int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh); 177int DH_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh);
173DH * d2i_DHparams(DH **a,const unsigned char **pp, long length); 178DH * d2i_DHparams(DH **a,const unsigned char **pp, long length);
@@ -200,6 +205,7 @@ void ERR_load_DH_strings(void);
200/* Reason codes. */ 205/* Reason codes. */
201#define DH_R_BAD_GENERATOR 101 206#define DH_R_BAD_GENERATOR 101
202#define DH_R_NO_PRIVATE_VALUE 100 207#define DH_R_NO_PRIVATE_VALUE 100
208#define DH_R_INVALID_PUBKEY 102
203 209
204#ifdef __cplusplus 210#ifdef __cplusplus
205} 211}