Fail if not finding iv.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21141 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -232,8 +232,14 @@ parse_rsa_private_key(hx509_context context, const char *fn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
iv = strchr(type, ',');
|
iv = strchr(type, ',');
|
||||||
if (iv)
|
if (iv == NULL) {
|
||||||
*iv++ = '\0';
|
free(type);
|
||||||
|
hx509_set_error_string(context, 0, HX509_PARSING_KEY_FAILED,
|
||||||
|
"IV missing");
|
||||||
|
return HX509_PARSING_KEY_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
*iv++ = '\0';
|
||||||
|
|
||||||
size = strlen(iv);
|
size = strlen(iv);
|
||||||
ivdata = malloc(size);
|
ivdata = malloc(size);
|
||||||
|
Reference in New Issue
Block a user