|
Lines 340-346
Link Here
|
| 340 |
} |
340 |
} |
| 341 |
if (!ast_strlen_zero(cfg->certfile)) { |
341 |
if (!ast_strlen_zero(cfg->certfile)) { |
| 342 |
char *tmpprivate = ast_strlen_zero(cfg->pvtfile) ? cfg->certfile : cfg->pvtfile; |
342 |
char *tmpprivate = ast_strlen_zero(cfg->pvtfile) ? cfg->certfile : cfg->pvtfile; |
| 343 |
if (SSL_CTX_use_certificate_file(cfg->ssl_ctx, cfg->certfile, SSL_FILETYPE_PEM) == 0) { |
343 |
if (SSL_CTX_use_certificate_chain_file(cfg->ssl_ctx, cfg->certfile) == 0) { |
| 344 |
if (!client) { |
344 |
if (!client) { |
| 345 |
/* Clients don't need a certificate, but if its setup we can use it */ |
345 |
/* Clients don't need a certificate, but if its setup we can use it */ |
| 346 |
ast_verb(0, "SSL error loading cert file. <%s>", cfg->certfile); |
346 |
ast_verb(0, "SSL error loading cert file. <%s>", cfg->certfile); |