diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-06 18:49:48 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-09 11:10:55 +0200 |
commit | 0aeddcfa61250a6c474c4f8b3533772a63192f1b (patch) | |
tree | d8ac8b14fc1bd8a365d522a0ecf0fc9999c01575 /crypto/dh/dh_locl.h | |
parent | Add SSL_DANE typedef for consistency. (diff) | |
download | openssl-0aeddcfa61250a6c474c4f8b3533772a63192f1b.tar.xz openssl-0aeddcfa61250a6c474c4f8b3533772a63192f1b.zip |
Make DH opaque
Move the dh_st structure into an internal header file and provide
relevant accessors for the internal fields.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dh/dh_locl.h')
-rw-r--r-- | crypto/dh/dh_locl.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/crypto/dh/dh_locl.h b/crypto/dh/dh_locl.h new file mode 100644 index 0000000000..5d51e591fe --- /dev/null +++ b/crypto/dh/dh_locl.h @@ -0,0 +1,38 @@ +/* + * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL licenses, (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * https://www.openssl.org/source/license.html + * or in the file LICENSE in the source distribution. + */ + +#include <openssl/dh.h> + +struct dh_st { + /* + * This first argument is used to pick up errors when a DH is passed + * instead of a EVP_PKEY + */ + int pad; + int version; + BIGNUM *p; + BIGNUM *g; + long length; /* optional */ + BIGNUM *pub_key; /* g^x % p */ + BIGNUM *priv_key; /* x */ + int flags; + BN_MONT_CTX *method_mont_p; + /* Place holders if we want to do X9.42 DH */ + BIGNUM *q; + BIGNUM *j; + unsigned char *seed; + int seedlen; + BIGNUM *counter; + int references; + CRYPTO_EX_DATA ex_data; + const DH_METHOD *meth; + ENGINE *engine; + CRYPTO_RWLOCK *lock; +}; |