[master] fix RSA parsing when md5 disabled

4645.	[bug]		Fix PKCS#11 RSA parsing when MD5 is disabled.
			[RT #45300]
This commit is contained in:
Evan Hunt
2017-06-29 15:53:35 -07:00
parent 916234485b
commit b05b3fab3c
4 changed files with 18 additions and 5 deletions

View File

@@ -605,7 +605,12 @@ dst__privstruct_parse(dst_key_t *key, unsigned int alg, isc_lex_t *lex,
goto fail;
}
#ifdef PK11_MD5_DISABLE
check = check_data(priv, alg == DST_ALG_RSA ? DST_ALG_RSASHA1 : alg,
ISC_TRUE, external);
#else
check = check_data(priv, alg, ISC_TRUE, external);
#endif
if (check < 0) {
ret = DST_R_INVALIDPRIVATEKEY;
goto fail;