mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:23:33 +03:00
x509asn1: raise size limit for x509 certification information
Raise the limit for certification information from 10 thousand to 100 thousand bytes. Certificates can be larger than 10k. Change the infof() debug output to add '...' at the end when the max limit it can handle is exceeded. Reported-by: Sergio Durigan Junior Fixes #14352 Closes #14354
This commit is contained in:
parent
d2abf8dede
commit
39b9ccea8d
5 changed files with 21 additions and 18 deletions
|
|
@ -118,10 +118,16 @@ static void trc_infof(struct Curl_easy *data, struct curl_trc_feat *feat,
|
|||
const char * const fmt, va_list ap)
|
||||
{
|
||||
int len = 0;
|
||||
char buffer[MAXINFO + 2];
|
||||
char buffer[MAXINFO + 5];
|
||||
if(feat)
|
||||
len = msnprintf(buffer, MAXINFO, "[%s] ", feat->name);
|
||||
len += mvsnprintf(buffer + len, MAXINFO - len, fmt, ap);
|
||||
len = msnprintf(buffer, (MAXINFO + 1), "[%s] ", feat->name);
|
||||
len += mvsnprintf(buffer + len, (MAXINFO + 1) - len, fmt, ap);
|
||||
if(len >= MAXINFO) { /* too long, shorten with '...' */
|
||||
--len;
|
||||
buffer[len++] = '.';
|
||||
buffer[len++] = '.';
|
||||
buffer[len++] = '.';
|
||||
}
|
||||
buffer[len++] = '\n';
|
||||
buffer[len] = '\0';
|
||||
Curl_debug(data, CURLINFO_TEXT, buffer, len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue