aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_certificate.erl
diff options
context:
space:
mode:
authorAndreas Schultz <[email protected]>2013-02-21 15:02:36 +0100
committerIngela Anderton Andin <[email protected]>2013-05-08 10:39:17 +0200
commit9c1fac89a82828106f2aac697fb748eee2f7bdc8 (patch)
tree368cacfd5354678ca27ef75272a9d03bb4506390 /lib/ssl/src/ssl_certificate.erl
parent432d3c39ad28fb4033b9e9c2c6aa4474dbfad03c (diff)
downloadotp-9c1fac89a82828106f2aac697fb748eee2f7bdc8.tar.gz
otp-9c1fac89a82828106f2aac697fb748eee2f7bdc8.tar.bz2
otp-9c1fac89a82828106f2aac697fb748eee2f7bdc8.zip
SSL: add Elliptic Curve support for ssl app
Diffstat (limited to 'lib/ssl/src/ssl_certificate.erl')
-rw-r--r--lib/ssl/src/ssl_certificate.erl15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_certificate.erl b/lib/ssl/src/ssl_certificate.erl
index 01a7cd93b5..9e1c3a09bf 100644
--- a/lib/ssl/src/ssl_certificate.erl
+++ b/lib/ssl/src/ssl_certificate.erl
@@ -37,7 +37,8 @@
is_valid_extkey_usage/2,
is_valid_key_usage/2,
select_extension/2,
- extensions_list/1
+ extensions_list/1,
+ public_key_type/1
]).
%%====================================================================
@@ -166,6 +167,18 @@ extensions_list(Extensions) ->
Extensions.
%%--------------------------------------------------------------------
+-spec public_key_type(term()) -> rsa | dsa | ec.
+%%
+%% Description:
+%%--------------------------------------------------------------------
+public_key_type(?'rsaEncryption') ->
+ rsa;
+public_key_type(?'id-dsa') ->
+ dsa;
+public_key_type(?'id-ecPublicKey') ->
+ ec.
+
+%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
certificate_chain(OtpCert, _Cert, CertDbHandle, CertsDbRef, Chain) ->