summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-11-29 19:34:51 +0000
committertb <>2021-11-29 19:34:51 +0000
commite5309bbaa68f8cc6b812d0fd95e304bfc5ad93df (patch)
treeda992fbad717278f003746b359ba7fc76cb7bc9e /src
parent4512e3f52290dfeeecdd3d26cee6f9bf2223839e (diff)
downloadopenbsd-e5309bbaa68f8cc6b812d0fd95e304bfc5ad93df.tar.gz
openbsd-e5309bbaa68f8cc6b812d0fd95e304bfc5ad93df.tar.bz2
openbsd-e5309bbaa68f8cc6b812d0fd95e304bfc5ad93df.zip
Provide a number of flags for DH_check and DH_check_pubkey
that will be used in subsequent commits. ok inoguchi jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/dh/dh.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h
index 082b50254d..f569f3f7c3 100644
--- a/src/lib/libcrypto/dh/dh.h
+++ b/src/lib/libcrypto/dh/dh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.h,v 1.25 2018/02/22 16:41:04 jsing Exp $ */ 1/* $OpenBSD: dh.h,v 1.26 2021/11/29 19:34:51 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -156,10 +156,14 @@ struct dh_st
156#define DH_CHECK_P_NOT_SAFE_PRIME 0x02 156#define DH_CHECK_P_NOT_SAFE_PRIME 0x02
157#define DH_UNABLE_TO_CHECK_GENERATOR 0x04 157#define DH_UNABLE_TO_CHECK_GENERATOR 0x04
158#define DH_NOT_SUITABLE_GENERATOR 0x08 158#define DH_NOT_SUITABLE_GENERATOR 0x08
159#define DH_CHECK_Q_NOT_PRIME 0x10
160#define DH_CHECK_INVALID_Q_VALUE 0x20
161#define DH_CHECK_INVALID_J_VALUE 0x40
159 162
160/* DH_check_pub_key error codes */ 163/* DH_check_pub_key error codes */
161#define DH_CHECK_PUBKEY_TOO_SMALL 0x01 164#define DH_CHECK_PUBKEY_TOO_SMALL 0x01
162#define DH_CHECK_PUBKEY_TOO_LARGE 0x02 165#define DH_CHECK_PUBKEY_TOO_LARGE 0x02
166#define DH_CHECK_PUBKEY_INVALID 0x04
163 167
164/* primes p where (p-1)/2 is prime too are called "safe"; we define 168/* primes p where (p-1)/2 is prime too are called "safe"; we define
165 this for backward compatibility: */ 169 this for backward compatibility: */