aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtls
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtls')
-rw-r--r--src/libtls/tls_peer.c3
-rw-r--r--src/libtls/tls_server.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libtls/tls_peer.c b/src/libtls/tls_peer.c
index cc2c529a9..221b629a5 100644
--- a/src/libtls/tls_peer.c
+++ b/src/libtls/tls_peer.c
@@ -505,7 +505,8 @@ static status_t send_key_exchange(private_tls_peer_t *this,
DBG1(DBG_IKE, "no TLS public key found for server '%Y'", this->server);
return FAILED;
}
- if (!public->encrypt(public, chunk_from_thing(premaster), &encrypted))
+ if (!public->encrypt(public, ENCRYPT_RSA_PKCS1,
+ chunk_from_thing(premaster), &encrypted))
{
public->destroy(public);
DBG1(DBG_IKE, "encrypting TLS premaster secret failed");
diff --git a/src/libtls/tls_server.c b/src/libtls/tls_server.c
index 712010edc..8d2c961ea 100644
--- a/src/libtls/tls_server.c
+++ b/src/libtls/tls_server.c
@@ -228,7 +228,8 @@ static status_t process_key_exchange(private_tls_server_t *this,
}
if (!this->private ||
- !this->private->decrypt(this->private, encrypted, &premaster))
+ !this->private->decrypt(this->private, ENCRYPT_RSA_PKCS1,
+ encrypted, &premaster))
{
DBG1(DBG_IKE, "decrypting Client Key Exchange data failed");
return FAILED;