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
This commit is contained in:
@@ -2284,7 +2284,7 @@ static CURLcode servercert(struct connectdata *conn,
|
|||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
X509 *issuer;
|
X509 *issuer;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char buffer[256];
|
char *buffer = data->state.buffer;
|
||||||
|
|
||||||
if(data->set.ssl.certinfo)
|
if(data->set.ssl.certinfo)
|
||||||
/* we've been asked to gather certificate info! */
|
/* we've been asked to gather certificate info! */
|
||||||
@@ -2301,7 +2301,7 @@ static CURLcode servercert(struct connectdata *conn,
|
|||||||
infof (data, "Server certificate:\n");
|
infof (data, "Server certificate:\n");
|
||||||
|
|
||||||
rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert),
|
rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert),
|
||||||
buffer, sizeof(buffer));
|
buffer, BUFSIZE);
|
||||||
if(rc) {
|
if(rc) {
|
||||||
if(strict)
|
if(strict)
|
||||||
failf(data, "SSL: couldn't get X509-subject!");
|
failf(data, "SSL: couldn't get X509-subject!");
|
||||||
|
Reference in New Issue
Block a user