diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_lu.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_lu.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c index 5121ae31ec..f21103c700 100644 --- a/src/lib/libcrypto/x509/x509_lu.c +++ b/src/lib/libcrypto/x509/x509_lu.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_lu.c,v 1.29 2018/05/18 17:46:17 tb Exp $ */ | 1 | /* $OpenBSD: x509_lu.c,v 1.30 2018/08/24 19:21:09 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 | * |
@@ -65,7 +65,6 @@ | |||
65 | #include "x509_lcl.h" | 65 | #include "x509_lcl.h" |
66 | 66 | ||
67 | static void X509_OBJECT_dec_ref_count(X509_OBJECT *a); | 67 | static void X509_OBJECT_dec_ref_count(X509_OBJECT *a); |
68 | /* static void X509_OBJECT_up_ref_count(X509_OBJECT *a); */ | ||
69 | 68 | ||
70 | X509_LOOKUP * | 69 | X509_LOOKUP * |
71 | X509_LOOKUP_new(X509_LOOKUP_METHOD *method) | 70 | X509_LOOKUP_new(X509_LOOKUP_METHOD *method) |
@@ -445,17 +444,16 @@ X509_OBJECT_dec_ref_count(X509_OBJECT *a) | |||
445 | } | 444 | } |
446 | } | 445 | } |
447 | 446 | ||
448 | /*static*/ void | 447 | int |
449 | X509_OBJECT_up_ref_count(X509_OBJECT *a) | 448 | X509_OBJECT_up_ref_count(X509_OBJECT *a) |
450 | { | 449 | { |
451 | switch (a->type) { | 450 | switch (a->type) { |
452 | case X509_LU_X509: | 451 | case X509_LU_X509: |
453 | CRYPTO_add(&a->data.x509->references, 1, CRYPTO_LOCK_X509); | 452 | return X509_up_ref(a->data.x509); |
454 | break; | ||
455 | case X509_LU_CRL: | 453 | case X509_LU_CRL: |
456 | CRYPTO_add(&a->data.crl->references, 1, CRYPTO_LOCK_X509_CRL); | 454 | return X509_CRL_up_ref(a->data.crl); |
457 | break; | ||
458 | } | 455 | } |
456 | return 1; | ||
459 | } | 457 | } |
460 | 458 | ||
461 | int | 459 | int |