Mercurial > trustbridge
diff cinst/mozilla.c @ 332:81a205fc651e
Do not exit on error
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 08 Apr 2014 17:47:35 +0000 |
parents | e30c9fee111a |
children | eab288779e07 |
line wrap: on
line diff
--- a/cinst/mozilla.c Tue Apr 08 15:09:13 2014 +0000 +++ b/cinst/mozilla.c Tue Apr 08 17:47:35 2014 +0000 @@ -370,6 +370,11 @@ size_t name_len; cn_str = x509_parse_subject(secitemp->data, secitemp->len, CERT_OID_CN); o_str = x509_parse_subject(secitemp->data, secitemp->len, CERT_OID_O); + if (!cn_str || !o_str) + { + DEBUGPRINTF("FATAL: Could not parse certificate!"); + exit(ERR_INVALID_CERT); + } name_len = strlen(cn_str) + strlen(o_str) + 4; name = (char *)xmalloc(name_len); snprintf(name, name_len, "%s - %s", cn_str, o_str);