Changeset View
Changeset View
Standalone View
Standalone View
head/sbin/decryptcore/decryptcore.c
Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | case KERNELDUMP_ENC_CHACHA20: | ||||
break; | break; | ||||
default: | default: | ||||
pjdlog_error("Invalid encryption algorithm."); | pjdlog_error("Invalid encryption algorithm."); | ||||
goto failed; | goto failed; | ||||
} | } | ||||
if (RSA_private_decrypt(kdk->kdk_encryptedkeysize, | if (RSA_private_decrypt(kdk->kdk_encryptedkeysize, | ||||
kdk->kdk_encryptedkey, key, privkey, | kdk->kdk_encryptedkey, key, privkey, | ||||
RSA_PKCS1_OAEP_PADDING) != sizeof(key) && | |||||
/* Fallback to deprecated, formerly-used PKCS 1.5 padding. */ | |||||
RSA_private_decrypt(kdk->kdk_encryptedkeysize, | |||||
kdk->kdk_encryptedkey, key, privkey, | |||||
RSA_PKCS1_PADDING) != sizeof(key)) { | RSA_PKCS1_PADDING) != sizeof(key)) { | ||||
pjdlog_error("Unable to decrypt key: %s", | pjdlog_error("Unable to decrypt key: %s", | ||||
ERR_error_string(ERR_get_error(), NULL)); | ERR_error_string(ERR_get_error(), NULL)); | ||||
goto failed; | goto failed; | ||||
} | } | ||||
RSA_free(privkey); | RSA_free(privkey); | ||||
privkey = NULL; | privkey = NULL; | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |