aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl.c b/ssl.c
index 9b3c4b5..34eb094 100644
--- a/ssl.c
+++ b/ssl.c
@@ -401,7 +401,7 @@ extract_x509_field_ssl (X509_NAME *x509, const char *field_name, char *out, int
do {
lastpos = tmp;
tmp = X509_NAME_get_index_by_NID(x509, nid, lastpos);
- } while (tmp > 0);
+ } while (tmp > -1);
/* Nothing found */
if (lastpos == -1)