summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/x509/x509_constraints.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_constraints.c b/src/lib/libcrypto/x509/x509_constraints.c
index 34795c0796..f50a55c6ac 100644
--- a/src/lib/libcrypto/x509/x509_constraints.c
+++ b/src/lib/libcrypto/x509/x509_constraints.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_constraints.c,v 1.7 2020/09/20 18:32:33 tb Exp $ */ 1/* $OpenBSD: x509_constraints.c,v 1.8 2020/09/20 19:13:06 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -769,9 +769,12 @@ x509_constraints_extract_names(struct x509_constraints_names *names,
769 } 769 }
770 subject_name = X509_get_subject_name(cert); 770 subject_name = X509_get_subject_name(cert);
771 if (X509_NAME_entry_count(subject_name) > 0) { 771 if (X509_NAME_entry_count(subject_name) > 0) {
772 struct x509_constraints_name *vname = NULL;
773 X509_NAME_ENTRY *email; 772 X509_NAME_ENTRY *email;
774 X509_NAME_ENTRY *cn; 773 X509_NAME_ENTRY *cn;
774
775 x509_constraints_name_free(vname);
776 vname = NULL;
777
775 /* 778 /*
776 * This cert has a non-empty subject, so we must add 779 * This cert has a non-empty subject, so we must add
777 * the subject as a dirname to be compared against 780 * the subject as a dirname to be compared against