Update - a0abb6a

This commit is contained in:
2018-05-25 02:40:46 +09:00
parent 8583c0a8a2
commit b6c074e393
15 changed files with 110 additions and 113 deletions
+11 -1
View File
@@ -282,7 +282,7 @@ int pkeyutl_main(int argc, char **argv)
buf_inlen = bio_to_mem(&buf_in, keysize * 10, in);
if (buf_inlen < 0) {
BIO_printf(bio_err, "Error reading input Data\n");
exit(1);
goto end;
}
if (rev) {
size_t i;
@@ -296,6 +296,16 @@ int pkeyutl_main(int argc, char **argv)
}
}
/* Sanity check the input */
if (buf_inlen > EVP_MAX_MD_SIZE
&& (pkey_op == EVP_PKEY_OP_SIGN
|| pkey_op == EVP_PKEY_OP_VERIFY
|| pkey_op == EVP_PKEY_OP_VERIFYRECOVER)) {
BIO_printf(bio_err,
"Error: The input data looks too long to be a hash\n");
goto end;
}
if (pkey_op == EVP_PKEY_OP_VERIFY) {
rv = EVP_PKEY_verify(ctx, sig, (size_t)siglen,
buf_in, (size_t)buf_inlen);