mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-10 16:31:44 +00:00
cleanup 'str' API
This commit is contained in:
1 parent
6c7672f4af
commit
3c531897b6
20 files changed
+350
-400
No files matched your search
+2
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user