Skip to content

Commit

Permalink
Add keygen test data
Browse files Browse the repository at this point in the history
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #3920)
  • Loading branch information
snhenson committed Jul 19, 2017
1 parent 1f0fc03 commit d76f646
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test/recipes/30-test_evp_data/evppkey.txt
Expand Up @@ -17447,3 +17447,37 @@ Result = DIGESTUPDATE_ERROR
DigestSign = SHA256
Key = ED25519-1
Result = DIGESTSIGNINIT_ERROR

# Key generation tests
KeyGen = rsaEncryption
Ctrl = rsa_keygen_bits:128
KeyName = tmprsa
Result = PKEY_CTRL_INVALID
Function = pkey_rsa_ctrl
Reason = key size too small

# RSA-PSS with restrictions, should succeed.
KeyGen = RSASSA-PSS
KeyName = tmppss
Ctrl = rsa_pss_keygen_md:sha256
Ctrl = rsa_pss_keygen_mgf1_md:sha512

# Check MGF1 restrictions
DigestVerify = SHA256
Key = tmppss
Ctrl = rsa_mgf1_md:sha256
Result = PKEY_CTRL_ERROR

# Test valid digest and MGF1 parameters. Verify will fail
DigestVerify = SHA256
Key = tmppss
Ctrl = rsa_mgf1_md:sha512
Input = ""
Output = ""
Result = VERIFY_ERROR

# Check caching of key MGF1 digest restriction
DigestVerify = SHA256
Key = tmppss
Ctrl = rsa_mgf1_md:sha1
Result = PKEY_CTRL_ERROR

0 comments on commit d76f646

Please sign in to comment.