cleanup 'str' API

This commit is contained in:
Sergio R. Caprile committed 2024-05-09 14:10:27 -03:00
1 parent 6c7672f4af
commit 3c531897b6
20 files changed
+350 -400

No files matched your search

+2 -1
View File
@@ -1233,7 +1233,8 @@ 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 = mg_strdup(pem);
der->buf = mg_mprintf("%.*s", pem.len, pem.buf);
der->len = pem.len;
return 0;
}
if (mg_strcmp(caps[1], label) != 0 || mg_strcmp(caps[3], label) != 0) {