diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 1 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/p_lib.c | 9 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 0c437dc75f..1cafdf06b4 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -1388,6 +1388,7 @@ EVP_PKEY_sign | |||
1388 | EVP_PKEY_sign_init | 1388 | EVP_PKEY_sign_init |
1389 | EVP_PKEY_size | 1389 | EVP_PKEY_size |
1390 | EVP_PKEY_type | 1390 | EVP_PKEY_type |
1391 | EVP_PKEY_up_ref | ||
1391 | EVP_PKEY_verify | 1392 | EVP_PKEY_verify |
1392 | EVP_PKEY_verify_init | 1393 | EVP_PKEY_verify_init |
1393 | EVP_PKEY_verify_recover | 1394 | EVP_PKEY_verify_recover |
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 853abe6b8e..09df7db64b 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp.h,v 1.53 2017/08/28 17:48:02 jsing Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.54 2018/02/14 16:40:42 jsing 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 | * |
@@ -894,6 +894,7 @@ struct gost_key_st; | |||
894 | 894 | ||
895 | EVP_PKEY *EVP_PKEY_new(void); | 895 | EVP_PKEY *EVP_PKEY_new(void); |
896 | void EVP_PKEY_free(EVP_PKEY *pkey); | 896 | void EVP_PKEY_free(EVP_PKEY *pkey); |
897 | int EVP_PKEY_up_ref(EVP_PKEY *pkey); | ||
897 | 898 | ||
898 | EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, | 899 | EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, |
899 | long length); | 900 | long length); |
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c index 0d4cd26d45..e001755ef1 100644 --- a/src/lib/libcrypto/evp/p_lib.c +++ b/src/lib/libcrypto/evp/p_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p_lib.c,v 1.17 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: p_lib.c,v 1.18 2018/02/14 16:40:42 jsing 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 | * |
@@ -204,6 +204,13 @@ EVP_PKEY_new(void) | |||
204 | return (ret); | 204 | return (ret); |
205 | } | 205 | } |
206 | 206 | ||
207 | int | ||
208 | EVP_PKEY_up_ref(EVP_PKEY *pkey) | ||
209 | { | ||
210 | int refs = CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); | ||
211 | return ((refs > 1) ? 1 : 0); | ||
212 | } | ||
213 | |||
207 | /* Setup a public key ASN1 method and ENGINE from a NID or a string. | 214 | /* Setup a public key ASN1 method and ENGINE from a NID or a string. |
208 | * If pkey is NULL just return 1 or 0 if the algorithm exists. | 215 | * If pkey is NULL just return 1 or 0 if the algorithm exists. |
209 | */ | 216 | */ |