early-access version 2698
This commit is contained in:
12
externals/libressl/crypto/asn1/x_crl.c
vendored
12
externals/libressl/crypto/asn1/x_crl.c
vendored
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: x_crl.c,v 1.34 2019/03/13 20:34:00 tb Exp $ */
|
||||
/* $OpenBSD: x_crl.c,v 1.37 2022/02/24 22:05:06 beck Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
#include "asn1_locl.h"
|
||||
#include "x509_lcl.h"
|
||||
|
||||
static int X509_REVOKED_cmp(const X509_REVOKED * const *a,
|
||||
const X509_REVOKED * const *b);
|
||||
@@ -287,9 +288,7 @@ crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
|
||||
break;
|
||||
|
||||
case ASN1_OP_D2I_POST:
|
||||
#ifndef OPENSSL_NO_SHA
|
||||
X509_CRL_digest(crl, EVP_sha1(), crl->sha1_hash, NULL);
|
||||
#endif
|
||||
X509_CRL_digest(crl, X509_CRL_HASH_EVP, crl->hash, NULL);
|
||||
crl->idp = X509_CRL_get_ext_d2i(crl,
|
||||
NID_issuing_distribution_point, NULL, NULL);
|
||||
if (crl->idp)
|
||||
@@ -659,14 +658,15 @@ X509_CRL_METHOD_new(int (*crl_init)(X509_CRL *crl),
|
||||
{
|
||||
X509_CRL_METHOD *m;
|
||||
|
||||
m = malloc(sizeof(X509_CRL_METHOD));
|
||||
if (!m)
|
||||
if ((m = calloc(1, sizeof(X509_CRL_METHOD))) == NULL)
|
||||
return NULL;
|
||||
|
||||
m->crl_init = crl_init;
|
||||
m->crl_free = crl_free;
|
||||
m->crl_lookup = crl_lookup;
|
||||
m->crl_verify = crl_verify;
|
||||
m->flags = X509_CRL_METHOD_DYNAMIC;
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user