From 4a72e5b639a41c6b119f9018e46fc931800b03b2 Mon Sep 17 00:00:00 2001 From: bcook Date: Sun, 5 Aug 2018 14:17:12 +0000 Subject: [PATCH] Remove unnecessary NULL check from get_cert_by_subject since sk_BY_DIR_HASH_find already does it, removing ambiguity later in the function. ok tb@ --- lib/libcrypto/x509/by_dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libcrypto/x509/by_dir.c b/lib/libcrypto/x509/by_dir.c index 01a302b538a..04eada8ad05 100644 --- a/lib/libcrypto/x509/by_dir.c +++ b/lib/libcrypto/x509/by_dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: by_dir.c,v 1.38 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: by_dir.c,v 1.39 2018/08/05 14:17:12 bcook Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -103,7 +103,7 @@ static X509_LOOKUP_METHOD x509_dir_lookup = { .name = "Load certs from files in a directory", .new_item = new_dir, .free = free_dir, - .init = NULL, + .init = NULL, .shutdown = NULL, .ctrl = dir_ctrl, .get_by_subject = get_cert_by_subject, @@ -316,7 +316,7 @@ get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name, X509error(ERR_R_MALLOC_FAILURE); goto finish; } - if (type == X509_LU_CRL && ent->hashes) { + if (type == X509_LU_CRL) { htmp.hash = h; CRYPTO_r_lock(CRYPTO_LOCK_X509_STORE); idx = sk_BY_DIR_HASH_find(ent->hashes, &htmp); -- 2.20.1