diff options
author | Ingela Anderton Andin <[email protected]> | 2015-04-20 08:44:29 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-04-20 08:44:29 +0200 |
commit | ddfbbcbbd489913120a55b2a054b046c68b40a8a (patch) | |
tree | 8e22768a89ca891d6f471805bc797467823382f8 /lib/ssl/test/erl_make_certs.erl | |
parent | aa8efa1cc3f776d5b3b5af24afd4369ca1f7da00 (diff) | |
parent | 5674d81d4112206e9fb03527137525ca544285de (diff) | |
download | otp-ddfbbcbbd489913120a55b2a054b046c68b40a8a.tar.gz otp-ddfbbcbbd489913120a55b2a054b046c68b40a8a.tar.bz2 otp-ddfbbcbbd489913120a55b2a054b046c68b40a8a.zip |
Merge branch 'ia/public_key/bitstring/OTP-12110'
* ia/public_key/bitstring/OTP-12110:
ssl: Adjust to public_key application removing legacy compact_bit_string switch
public_key: Update vsn for OTP 18
public_key: Reject bad signatures as early as possible
public_key: Remove legacy switch compact_bit_string
Diffstat (limited to 'lib/ssl/test/erl_make_certs.erl')
-rw-r--r-- | lib/ssl/test/erl_make_certs.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ssl/test/erl_make_certs.erl b/lib/ssl/test/erl_make_certs.erl index b534c0130e..12ad1e5402 100644 --- a/lib/ssl/test/erl_make_certs.erl +++ b/lib/ssl/test/erl_make_certs.erl @@ -114,7 +114,7 @@ verify_signature(DerEncodedCert, DerKey, _KeyParams) -> #'DSAPrivateKey'{p=P, q=Q, g=G, y=Y} -> public_key:pkix_verify(DerEncodedCert, {Y, #'Dss-Parms'{p=P, q=Q, g=G}}); #'ECPrivateKey'{version = _Version, privateKey = _PrivKey, - parameters = Params, publicKey = {0, PubKey}} -> + parameters = Params, publicKey = PubKey} -> public_key:pkix_verify(DerEncodedCert, {#'ECPoint'{point = PubKey}, Params}) end. @@ -292,7 +292,7 @@ publickey(#'DSAPrivateKey'{p=P, q=Q, g=G, y=Y}) -> publickey(#'ECPrivateKey'{version = _Version, privateKey = _PrivKey, parameters = Params, - publicKey = {0, PubKey}}) -> + publicKey = PubKey}) -> Algo = #'PublicKeyAlgorithm'{algorithm= ?'id-ecPublicKey', parameters=Params}, #'OTPSubjectPublicKeyInfo'{algorithm = Algo, subjectPublicKey = #'ECPoint'{point = PubKey}}. @@ -401,9 +401,9 @@ gen_ec2(CurveId) -> {PubKey, PrivKey} = crypto:generate_key(ecdh, CurveId), #'ECPrivateKey'{version = 1, - privateKey = binary_to_list(PrivKey), + privateKey = PrivKey, parameters = {namedCurve, pubkey_cert_records:namedCurves(CurveId)}, - publicKey = {0, PubKey}}. + publicKey = PubKey}. %% See fips_186-3.pdf dsa_search(T, P0, Q, Iter) when Iter > 0 -> |