diff options
author | Eduardo Chappa <chappa@washington.edu> | 2013-10-06 23:58:51 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2013-10-06 23:58:51 -0600 |
commit | 30a979ab1460a57d466a6a5cc6adb96eac452ce4 (patch) | |
tree | 1aec0ebb21be40922bc5a708c7780fb0db602202 /pith/smkeys.c | |
parent | c5bb25b1320af6cda4cc62ea9e15fbb03ee92026 (diff) | |
download | alpine-30a979ab1460a57d466a6a5cc6adb96eac452ce4.tar.xz |
* 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.
Diffstat (limited to 'pith/smkeys.c')
-rw-r--r-- | pith/smkeys.c | 13 |
1 files changed, 8 insertions, 5 deletions
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; |