The branch master has been updated
via 991f0355fb782f499e226a732c0099847048c91a (commit)
from 1b712f3fe4752ae1c770f06f957c0e5675b1801c (commit)
- Log -----------------------------------------------------------------
commit 991f0355fb782f499e226a732c0099847048c91a
Author: FdaSilvaYY <[email protected]>
Date: Tue May 8 09:47:26 2018 +0200
apps/ca: fix useless get before delete.
Small simplification by skipping effectively redundant step and
not resuming search from point past deletion.
Reviewed-by: Andy Polyakov <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/6195)
-----------------------------------------------------------------------
Summary of changes:
apps/ca.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/ca.c b/apps/ca.c
index 4a8396e..558809e 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1706,11 +1706,11 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509
*x509,
BIO_printf(bio_err, "Memory allocation failure\n");
goto end;
}
+ i = -1;
while ((i = X509_NAME_get_index_by_NID(dn_subject,
NID_pkcs9_emailAddress,
- -1)) >= 0) {
- tmpne = X509_NAME_get_entry(dn_subject, i);
- X509_NAME_delete_entry(dn_subject, i);
+ i)) >= 0) {
+ tmpne = X509_NAME_delete_entry(dn_subject, i--);
X509_NAME_ENTRY_free(tmpne);
}
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits