Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssl.old/dist/crypto/dh add set0_key ...



details:   https://anonhg.NetBSD.org/src/rev/76d9af41cf88
branches:  trunk
changeset: 829644:76d9af41cf88
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Feb 07 13:16:25 2018 +0000

description:
add set0_key needed by racoon

diffstat:

 crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 28870badf1ea -r 76d9af41cf88 crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h
--- a/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h       Wed Feb 07 12:15:32 2018 +0000
+++ b/crypto/external/bsd/openssl.old/dist/crypto/dh/dh.h       Wed Feb 07 13:16:25 2018 +0000
@@ -397,6 +397,20 @@
                *priv_key = dh->priv_key;
 }
 
+static inline int
+DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
+{
+       if (pub_key) {
+               BN_free(dh->pub_key);
+               dh->pub_key = pub_key;
+       }
+       if (priv_key) {
+               BN_free(dh->priv_key);
+               dh->priv_key = priv_key;
+       }
+       return 1;
+}
+
 static inline void
 DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
     const BIGNUM **g)



Home | Main Index | Thread Index | Old Index