Fix get_email: 0 is a valid return value
This commit is contained in:
parent
738554331b
commit
65caee44ff
1 changed files with 1 additions and 1 deletions
|
@ -492,7 +492,7 @@ static STACK *get_email(X509_NAME *name, GENERAL_NAMES *gens)
|
||||||
i = -1;
|
i = -1;
|
||||||
/* First supplied X509_NAME */
|
/* First supplied X509_NAME */
|
||||||
while((i = X509_NAME_get_index_by_NID(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);
|
ne = X509_NAME_get_entry(name, i);
|
||||||
email = X509_NAME_ENTRY_get_data(ne);
|
email = X509_NAME_ENTRY_get_data(ne);
|
||||||
if(!append_ia5(&ret, email)) return NULL;
|
if(!append_ia5(&ret, email)) return NULL;
|
||||||
|
|
Loading…
Reference in a new issue