From 0aefbb03fa51b6cc06eedd0b030e46ab9782536f Mon Sep 17 00:00:00 2001 From: bcook <> Date: Sun, 5 Aug 2018 14:17:12 +0000 Subject: 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@ --- src/lib/libcrypto/x509/by_dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c index 01a302b538..04eada8ad0 100644 --- a/src/lib/libcrypto/x509/by_dir.c +++ b/src/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); -- cgit v1.2.3-55-g6feb