summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorsteve <steve>2002-11-14 00:46:11 +0000
committersteve <steve>2002-11-14 00:46:11 +0000
commitcffa22e718c34aba21ee337de03c1d9901230ba7 (patch)
treeec3fd346f74bd352770fedd10d48e2713224e60f /crypto
parentb9ac40b504742c19b067e452d7e441de99d8a789 (diff)
downloadopenssl-cffa22e718c34aba21ee337de03c1d9901230ba7.tar.gz
Fix get_email: 0 is a valid return value
Diffstat (limited to 'crypto')
-rw-r--r--crypto/x509v3/v3_utl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c
index 1f0db9477..a11243db8 100644
--- a/crypto/x509v3/v3_utl.c
+++ b/crypto/x509v3/v3_utl.c
@@ -492,7 +492,7 @@ static STACK *get_email(X509_NAME *name, GENERAL_NAMES *gens)
i = -1;
/* First supplied X509_NAME */
while((i = X509_NAME_get_index_by_NID(name,
- NID_pkcs9_emailAddress, i)) > 0) {
+ NID_pkcs9_emailAddress, i)) >= 0) {
ne = X509_NAME_get_entry(name, i);
email = X509_NAME_ENTRY_get_data(ne);
if(!append_ia5(&ret, email)) return NULL;