From 30a979ab1460a57d466a6a5cc6adb96eac452ce4 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 6 Oct 2013 23:58:51 -0600 Subject: * new version 2.11.8 * Fix in configure script for recognition of SSL files in Ubuntu 12.04 * Alpine does not attempt to automatically reopen a collection that was not opened due to cancellation by the user. Instead, the user must try to open it explicitly. * few improvements on new /tls1, /tls1_1, etc. options. --- pith/smkeys.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'pith/smkeys.c') diff --git a/pith/smkeys.c b/pith/smkeys.c index 5a827070..e815a59a 100644 --- a/pith/smkeys.c +++ b/pith/smkeys.c @@ -273,14 +273,17 @@ get_x509_subject_email(X509 *x) * address not only in the email address field, but also in an * X509v3 extension field, Subject Altenative Name. */ -char * +char ** get_x509_subject_email(X509 *x) { - char *result = NULL; + char **result = NULL; + int i, n; STACK_OF(OPENSSL_STRING) *emails = X509_get1_email(x); - if (sk_OPENSSL_STRING_num(emails) > 0) { - /* take the first one on the stack */ - result = cpystr(sk_OPENSSL_STRING_value(emails, 0)); + if ((n = sk_OPENSSL_STRING_num(emails)) > 0) { + result = fs_get((n+1)*sizeof(char *)); + for(i = 0; i < n; i++) + result[i] = cpystr(sk_OPENSSL_STRING_value(emails, i)); + result[i] = NULL; } X509_email_free(emails); return result; -- cgit v1.2.3-70-g09d2