diff options
author | Erlang/OTP <[email protected]> | 2018-07-20 14:09:35 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2018-07-20 14:09:35 +0200 |
commit | 4f5729d3d2618e07d6e23dacbdcd57e2b51fc113 (patch) | |
tree | 3527a403ad4d369cb0cc2145ee9296657eb3c205 /lib/ssl/src/ssl_config.erl | |
parent | 6e18e093a1cf0116db803d7e602ff8adc348ab3b (diff) | |
parent | 15035d294c753f97339d96a3cb62b57aaef8ac78 (diff) | |
download | otp-4f5729d3d2618e07d6e23dacbdcd57e2b51fc113.tar.gz otp-4f5729d3d2618e07d6e23dacbdcd57e2b51fc113.tar.bz2 otp-4f5729d3d2618e07d6e23dacbdcd57e2b51fc113.zip |
Merge branch 'ingela/maint-20/chipher-suite-handling/OTP-15178' into maint-20
* ingela/maint-20/chipher-suite-handling/OTP-15178:
ssl: Prepare for release
ssl: Fix test case to only check relevant info for the test
ssl: Correct connection_information on ECC-curves
ssl: No cipher suite sign restriction in TLS-1.2
ssl: Add psk as anonymous key exchange in ssl_handshake:select_hashsign/5
ssl: anon test should use dh or ecdh anon keyexchange
ssl: Correct key_usage check
ssl: Fix ECDSA key decode clause
ssl: Avoid hardcoding of cipher suites and fix ECDH suite handling
ssl: Run all test case combinations
ssl: Correct ECC suite and DTLS ECC handling
Diffstat (limited to 'lib/ssl/src/ssl_config.erl')
-rw-r--r-- | lib/ssl/src/ssl_config.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_config.erl b/lib/ssl/src/ssl_config.erl index 022fb7eac0..452a98e683 100644 --- a/lib/ssl/src/ssl_config.erl +++ b/lib/ssl/src/ssl_config.erl @@ -132,7 +132,13 @@ private_key(#'PrivateKeyInfo'{privateKeyAlgorithm = #'PrivateKeyInfo_privateKeyAlgorithm'{algorithm = ?'id-dsa'}, privateKey = Key}) -> public_key:der_decode('DSAPrivateKey', iolist_to_binary(Key)); - +private_key(#'PrivateKeyInfo'{privateKeyAlgorithm = + #'PrivateKeyInfo_privateKeyAlgorithm'{algorithm = ?'id-ecPublicKey', + parameters = {asn1_OPENTYPE, Parameters}}, + privateKey = Key}) -> + ECKey = public_key:der_decode('ECPrivateKey', iolist_to_binary(Key)), + ECParameters = public_key:der_decode('EcpkParameters', Parameters), + ECKey#'ECPrivateKey'{parameters = ECParameters}; private_key(Key) -> Key. |