mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-08 16:11:18 +00:00
bring mg_strdup() back
This commit is contained in:
1 parent
a4e0225c69
commit
ab75bfa6e7
11 files changed
+46
-16
No files matched your search
+1
-2
@@ -1233,8 +1233,7 @@ static int mg_parse_pem(const struct mg_str pem, const struct mg_str label,
|
||||
const char *c;
|
||||
struct mg_str caps[5];
|
||||
if (!mg_match(pem, mg_str("#-----BEGIN #-----#-----END #-----#"), caps)) {
|
||||
der->buf = mg_mprintf("%.*s", pem.len, pem.buf);
|
||||
der->len = pem.len;
|
||||
*der = mg_strdup(pem);
|
||||
return 0;
|
||||
}
|
||||
if (mg_strcmp(caps[1], label) != 0 || mg_strcmp(caps[3], label) != 0) {
|
||||
|
||||
Reference in new issue
Block a user