mirror of
https://github.com/curl/curl.git
synced 2026-07-16 12:07:16 +03:00
ASN1 files don't work for the *chain_file(), make them use the previous
version
This commit is contained in:
parent
c3c392fc98
commit
323f195036
1 changed files with 13 additions and 1 deletions
14
lib/ssluse.c
14
lib/ssluse.c
|
|
@ -227,13 +227,25 @@ int cert_stuff(struct connectdata *conn,
|
|||
|
||||
switch(file_type) {
|
||||
case SSL_FILETYPE_PEM:
|
||||
case SSL_FILETYPE_ASN1:
|
||||
/* SSL_CTX_use_certificate_chain_file() only works on PEM files */
|
||||
if (SSL_CTX_use_certificate_chain_file(conn->ssl.ctx,
|
||||
cert_file) != 1) {
|
||||
failf(data, "unable to set certificate file (wrong password?)");
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case SSL_FILETYPE_ASN1:
|
||||
/* SSL_CTX_use_certificate_file() works with either PEM or ASN1, but
|
||||
we use the case above for PEM so this can only be performed with
|
||||
ASN1 files. */
|
||||
if (SSL_CTX_use_certificate_file(conn->ssl.ctx,
|
||||
cert_file,
|
||||
file_type) != 1) {
|
||||
failf(data, "unable to set certificate file (wrong password?)");
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case SSL_FILETYPE_ENGINE:
|
||||
failf(data, "file type ENG for certificate not implemented");
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue