Permalink
Browse files

Also load intermediates certificates chain (if any) from the PEM file

  • Loading branch information...
1 parent d3a1f6b commit e73e95486d248e753c0b841e1d0a987b4438570c @bpineau bpineau committed Jul 14, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 README.md
  2. +1 −1 stud.c
View
@@ -55,7 +55,7 @@ Usage
-----
The only required argument is a path to a PEM file that contains the certificate
-and private key.
+(or a chain of certificates) and private key.
The entire set of arguments can be invoked with `stud -h`:
View
2 stud.c
@@ -180,7 +180,7 @@ static SSL_CTX * init_openssl() {
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2 | SSL_OP_ALL |
SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
- if (SSL_CTX_use_certificate_file(ctx, OPTIONS.CERT_FILE, SSL_FILETYPE_PEM) <= 0) {
+ if (SSL_CTX_use_certificate_chain_file(ctx, OPTIONS.CERT_FILE) <= 0) {
ERR_print_errors_fp(stderr);
exit(1);
}

0 comments on commit e73e954

Please sign in to comment.