aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-06-09 00:06:54 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-06-09 00:06:54 +0200
commit674e53f40ee1c5a8c3c9e2b0c8a748cae0ebe85c (patch)
tree1eac68fd0a1826a4e9611e338da1497be646653a /lib
parent68857e40d69ef792bfcc6d7395c65305a4117c51 (diff)
OpenSSL: support longer certificate subject names
Previously it would use a 256 byte buffer and thus cut off very long subject names. The limit is now upped to the receive buffer size, 16K. Bug: http://curl.haxx.se/bug/view.cgi?id=3533045 Reported by: Anthony G. Basile
Diffstat (limited to 'lib')
-rw-r--r--lib/ssluse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index a55ad3ce1..7ca466663 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -2284,7 +2284,7 @@ static CURLcode servercert(struct connectdata *conn,
struct SessionHandle *data = conn->data;
X509 *issuer;
FILE *fp;
- char buffer[256];
+ char *buffer = data->state.buffer;
if(data->set.ssl.certinfo)
/* we've been asked to gather certificate info! */
@@ -2301,7 +2301,7 @@ static CURLcode servercert(struct connectdata *conn,
infof (data, "Server certificate:\n");
rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert),
- buffer, sizeof(buffer));
+ buffer, BUFSIZE);
if(rc) {
if(strict)
failf(data, "SSL: couldn't get X509-subject!");