diff options
| author | speidy <speidy@gmail.com> | 2014-12-10 00:04:38 +0200 |
|---|---|---|
| committer | speidy <speidy@gmail.com> | 2014-12-10 00:04:38 +0200 |
| commit | 86005c5bcc7fbb351c95d1f679a63c6bf30175b8 (patch) | |
| tree | 50414677641253a4bd88576cb2c537a1dc2d7b03 /common/ssl_calls.c | |
| parent | d9d746ce5c9afdca0d67e4115c01343dd6ba8ddb (diff) | |
| download | xrdp-proprietary-86005c5bcc7fbb351c95d1f679a63c6bf30175b8.tar.gz xrdp-proprietary-86005c5bcc7fbb351c95d1f679a63c6bf30175b8.zip | |
ssl_calls: fix to read certificate chains
Diffstat (limited to 'common/ssl_calls.c')
| -rw-r--r-- | common/ssl_calls.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/ssl_calls.c b/common/ssl_calls.c index 99e9c50e..ae30fe71 100644 --- a/common/ssl_calls.c +++ b/common/ssl_calls.c @@ -649,17 +649,17 @@ ssl_tls_accept(struct ssl_tls *self) return 1; } - self->ssl = SSL_new(self->ctx); - - if (self->ssl == NULL) + if (SSL_CTX_use_certificate_chain_file(self->ctx, self->cert) <= 0) { - g_writeln("ssl_tls_accept: SSL_new failed"); + g_writeln("ssl_tls_accept: SSL_CTX_use_certificate_chain_file failed"); return 1; } - if (SSL_use_certificate_file(self->ssl, self->cert, SSL_FILETYPE_PEM) <= 0) + self->ssl = SSL_new(self->ctx); + + if (self->ssl == NULL) { - g_writeln("ssl_tls_accept: SSL_use_certificate_file failed"); + g_writeln("ssl_tls_accept: SSL_new failed"); return 1; } |
