diff options
| author | jsing <> | 2018-02-22 16:53:42 +0000 |
|---|---|---|
| committer | jsing <> | 2018-02-22 16:53:42 +0000 |
| commit | 7d56ddb1c23469ea369cb6c35fa9bcccf3324fa4 (patch) | |
| tree | 7e3d46251997d49a762a00da772b5b4c06abe2c6 | |
| parent | 0e70c1424cfd8c4191fc2f6ad92dcd04051f49be (diff) | |
| download | openbsd-7d56ddb1c23469ea369cb6c35fa9bcccf3324fa4.tar.gz openbsd-7d56ddb1c23469ea369cb6c35fa9bcccf3324fa4.tar.bz2 openbsd-7d56ddb1c23469ea369cb6c35fa9bcccf3324fa4.zip | |
Provide X509_CRL_up_ref().
| -rw-r--r-- | src/lib/libcrypto/Symbols.list | 1 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509cset.c | 9 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index fb10bdedd6..3b4cbc386f 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
| @@ -2675,6 +2675,7 @@ X509_CRL_set_version | |||
| 2675 | X509_CRL_sign | 2675 | X509_CRL_sign |
| 2676 | X509_CRL_sign_ctx | 2676 | X509_CRL_sign_ctx |
| 2677 | X509_CRL_sort | 2677 | X509_CRL_sort |
| 2678 | X509_CRL_up_ref | ||
| 2678 | X509_CRL_verify | 2679 | X509_CRL_verify |
| 2679 | X509_EXTENSIONS_it | 2680 | X509_EXTENSIONS_it |
| 2680 | X509_EXTENSION_create_by_NID | 2681 | X509_EXTENSION_create_by_NID |
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 9033b1d4d9..3dc636473f 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509.h,v 1.34 2018/02/22 16:50:30 jsing Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.35 2018/02/22 16:53: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 | * |
| @@ -606,6 +606,8 @@ extern "C" { | |||
| 606 | #define X509_CRL_get_issuer(x) ((x)->crl->issuer) | 606 | #define X509_CRL_get_issuer(x) ((x)->crl->issuer) |
| 607 | #define X509_CRL_get_REVOKED(x) ((x)->crl->revoked) | 607 | #define X509_CRL_get_REVOKED(x) ((x)->crl->revoked) |
| 608 | 608 | ||
| 609 | int X509_CRL_up_ref(X509_CRL *x); | ||
| 610 | |||
| 609 | const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl); | 611 | const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl); |
| 610 | const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl); | 612 | const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl); |
| 611 | void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, | 613 | void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, |
diff --git a/src/lib/libcrypto/x509/x509cset.c b/src/lib/libcrypto/x509/x509cset.c index 88de63debd..3fc31cd519 100644 --- a/src/lib/libcrypto/x509/x509cset.c +++ b/src/lib/libcrypto/x509/x509cset.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509cset.c,v 1.12 2018/02/22 16:47:50 jsing Exp $ */ | 1 | /* $OpenBSD: x509cset.c,v 1.13 2018/02/22 16:53:42 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2001. | 3 | * project 2001. |
| 4 | */ | 4 | */ |
| @@ -64,6 +64,13 @@ | |||
| 64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 65 | 65 | ||
| 66 | int | 66 | int |
| 67 | X509_CRL_up_ref(X509_CRL *x) | ||
| 68 | { | ||
| 69 | int refs = CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL); | ||
| 70 | return (refs > 1) ? 1 : 0; | ||
| 71 | } | ||
| 72 | |||
| 73 | int | ||
| 67 | X509_CRL_set_version(X509_CRL *x, long version) | 74 | X509_CRL_set_version(X509_CRL *x, long version) |
| 68 | { | 75 | { |
| 69 | if (x == NULL) | 76 | if (x == NULL) |
