diff options
-rw-r--r-- | src/lib/libcrypto/asn1/x_crl.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/libcrypto/asn1/x_crl.c b/src/lib/libcrypto/asn1/x_crl.c index c482864c72..55faeda784 100644 --- a/src/lib/libcrypto/asn1/x_crl.c +++ b/src/lib/libcrypto/asn1/x_crl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x_crl.c,v 1.46 2025/02/24 20:07:14 tb Exp $ */ | 1 | /* $OpenBSD: x_crl.c,v 1.47 2025/02/27 20:12:25 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 | * |
@@ -68,8 +68,6 @@ | |||
68 | #include "asn1_local.h" | 68 | #include "asn1_local.h" |
69 | #include "x509_local.h" | 69 | #include "x509_local.h" |
70 | 70 | ||
71 | static int X509_REVOKED_cmp(const X509_REVOKED * const *a, | ||
72 | const X509_REVOKED * const *b); | ||
73 | static void setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); | 71 | static void setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); |
74 | 72 | ||
75 | static const ASN1_TEMPLATE X509_REVOKED_seq_tt[] = { | 73 | static const ASN1_TEMPLATE X509_REVOKED_seq_tt[] = { |
@@ -101,6 +99,12 @@ const ASN1_ITEM X509_REVOKED_it = { | |||
101 | }; | 99 | }; |
102 | LCRYPTO_ALIAS(X509_REVOKED_it); | 100 | LCRYPTO_ALIAS(X509_REVOKED_it); |
103 | 101 | ||
102 | static int | ||
103 | X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b) | ||
104 | { | ||
105 | return ASN1_INTEGER_cmp((*a)->serialNumber, (*b)->serialNumber); | ||
106 | } | ||
107 | |||
104 | /* The X509_CRL_INFO structure needs a bit of customisation. | 108 | /* The X509_CRL_INFO structure needs a bit of customisation. |
105 | * Since we cache the original encoding the signature wont be affected by | 109 | * Since we cache the original encoding the signature wont be affected by |
106 | * reordering of the revoked field. | 110 | * reordering of the revoked field. |
@@ -516,12 +520,6 @@ X509_CRL_dup(X509_CRL *x) | |||
516 | } | 520 | } |
517 | LCRYPTO_ALIAS(X509_CRL_dup); | 521 | LCRYPTO_ALIAS(X509_CRL_dup); |
518 | 522 | ||
519 | static int | ||
520 | X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b) | ||
521 | { | ||
522 | return(ASN1_INTEGER_cmp((*a)->serialNumber, (*b)->serialNumber)); | ||
523 | } | ||
524 | |||
525 | int | 523 | int |
526 | X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) | 524 | X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) |
527 | { | 525 | { |