Skip to content

Commit 7ba055f

Browse files
authored
Read certificate from chain file (#616)
Co-authored-by: Пустовских Дмитрий Александрович <@dmitriy.pustovskih>
1 parent e6a5587 commit 7ba055f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ssl/openssl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ hssl_ctx_t hssl_ctx_new(hssl_ctx_opt_t* param) {
4949
}
5050

5151
if (param->crt_file && *param->crt_file) {
52-
if (!SSL_CTX_use_certificate_file(ctx, param->crt_file, SSL_FILETYPE_PEM)) {
52+
if (!SSL_CTX_use_certificate_chain_file(ctx, param->crt_file)) {
5353
fprintf(stderr, "ssl crt_file error!\n");
5454
goto error;
5555
}

0 commit comments

Comments
 (0)