aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-24 15:51:09 +0000
committerlloyd <[email protected]>2012-01-24 15:51:09 +0000
commit625e3400f5be4b48f7e2c43395bcb5fd7ddeaa33 (patch)
treef49bc4fc9c99e92554176b2a5a31c625e0193b4c /src
parent9e37cd76af978147cbb36faa09b9832b5f15f20a (diff)
ECDSA support. Only client side tested
Diffstat (limited to 'src')
-rw-r--r--src/tls/tls_handshake_state.cpp6
-rw-r--r--src/tls/tls_policy.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/tls/tls_handshake_state.cpp b/src/tls/tls_handshake_state.cpp
index 15017648c..c98b147d9 100644
--- a/src/tls/tls_handshake_state.cpp
+++ b/src/tls/tls_handshake_state.cpp
@@ -173,7 +173,7 @@ Handshake_State::choose_sig_format(const Private_Key* key,
return std::make_pair(padding, IEEE_1363);
}
- else if(sig_algo == "DSA")
+ else if(sig_algo == "DSA" || sig_algo == "ECDSA")
{
const std::string padding = "EMSA1(" + hash_algo + ")";
@@ -227,9 +227,9 @@ Handshake_State::understand_sig_format(const Public_Key* key,
const std::string padding = "EMSA3(" + hash_algo + ")";
return std::make_pair(padding, IEEE_1363);
}
- else if(algo_name == "DSA")
+ else if(algo_name == "DSA" || algo_name == "ECDSA")
{
- if(for_client_auth && this->version == Protocol_Version::SSL_V3)
+ if(algo_name == "DSA" && for_client_auth && this->version == Protocol_Version::SSL_V3)
{
hash_algo = "Raw";
}
diff --git a/src/tls/tls_policy.cpp b/src/tls/tls_policy.cpp
index c0ce15641..77b103aa2 100644
--- a/src/tls/tls_policy.cpp
+++ b/src/tls/tls_policy.cpp
@@ -50,7 +50,7 @@ std::vector<std::string> Policy::allowed_key_exchange_methods() const
std::vector<std::string> Policy::allowed_signature_methods() const
{
std::vector<std::string> allowed;
- //allowed.push_back("ECDSA");
+ allowed.push_back("ECDSA");
allowed.push_back("RSA");
allowed.push_back("DSA");
return allowed;