From 674e53f40ee1c5a8c3c9e2b0c8a748cae0ebe85c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 9 Jun 2012 00:06:54 +0200 Subject: 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 --- lib/ssluse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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!"); -- cgit v1.2.3