summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_alt.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-03-01 14:32:11 +0100
committerDr. Stephen Henson <steve@openssl.org>2001-03-01 14:32:11 +0100
commitf23478c3140637799d4aded503a7ecafbae8ba22 (patch)
treefe10011630da31c8b5e967e876eb4ef6057538d2 /crypto/x509v3/v3_alt.c
parentFix a bug which caused BN_div to produce the (diff)
downloadopenssl-f23478c3140637799d4aded503a7ecafbae8ba22.tar.xz
openssl-f23478c3140637799d4aded503a7ecafbae8ba22.zip
Fix bug in copy_email() which would not
find emailAddress at start of subject name.
Diffstat (limited to 'crypto/x509v3/v3_alt.c')
-rw-r--r--crypto/x509v3/v3_alt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c
index f7dabc4f2b..0fc5c1fb13 100644
--- a/crypto/x509v3/v3_alt.c
+++ b/crypto/x509v3/v3_alt.c
@@ -318,7 +318,7 @@ static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens)
/* Now add any email address(es) to STACK */
i = -1;
while((i = X509_NAME_get_index_by_NID(nm,
- NID_pkcs9_emailAddress, i)) > 0) {
+ NID_pkcs9_emailAddress, i)) >= 0) {
ne = X509_NAME_get_entry(nm, i);
email = M_ASN1_IA5STRING_dup(X509_NAME_ENTRY_get_data(ne));
if(!email || !(gen = GENERAL_NAME_new())) {