Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libfetch/common.c
Show All 38 Lines | |||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <ctype.h> | #include <ctype.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <fcntl.h> | #include <fcntl.h> | ||||
#include <inttypes.h> | #include <inttypes.h> | ||||
#include <netdb.h> | #include <netdb.h> | ||||
#include <paths.h> | |||||
#include <poll.h> | #include <poll.h> | ||||
#include <pwd.h> | #include <pwd.h> | ||||
#include <stdarg.h> | #include <stdarg.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
▲ Show 20 Lines • Show All 1,011 Lines • ▼ Show 20 Lines | if (verbose) | ||||
fetch_info("SSL options: %lx", ssl_ctx_options); | fetch_info("SSL options: %lx", ssl_ctx_options); | ||||
SSL_CTX_set_options(ctx, ssl_ctx_options); | SSL_CTX_set_options(ctx, ssl_ctx_options); | ||||
} | } | ||||
/* | /* | ||||
* Configure peer verification based on environment. | * Configure peer verification based on environment. | ||||
*/ | */ | ||||
#define LOCAL_CERT_FILE "/usr/local/etc/ssl/cert.pem" | #define LOCAL_CERT_FILE _PATH_LOCALBASE "/etc/ssl/cert.pem" | ||||
#define BASE_CERT_FILE "/etc/ssl/cert.pem" | #define BASE_CERT_FILE "/etc/ssl/cert.pem" | ||||
static int | static int | ||||
fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) | fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) | ||||
{ | { | ||||
X509_LOOKUP *crl_lookup; | X509_LOOKUP *crl_lookup; | ||||
X509_STORE *crl_store; | X509_STORE *crl_store; | ||||
const char *ca_cert_file, *ca_cert_path, *crl_file; | const char *ca_cert_file, *ca_cert_path, *crl_file; | ||||
▲ Show 20 Lines • Show All 722 Lines • Show Last 20 Lines |