Skip to content

Commit

Permalink
Reload TLS certificate CRLs on SIGHUP
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mauchle committed Mar 24, 2017
1 parent 402cc31 commit 4f223d3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes between 1.6.8 and the master branch

Enhancements:
- Support the use of OpenSSL version 1.1 series (RADSECPROXY-66).
- Reload TLS certificate CRLs on SIGHUP

Misc:
- libnettle is now an unconditional dependency.
Expand Down
3 changes: 3 additions & 0 deletions radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3250,6 +3250,9 @@ void *sighandler(void *arg) {
case SIGHUP:
debug(DBG_INFO, "sighandler: got SIGHUP");
debug_reopen_log();
#if defined(RADPROT_TLS) || defined(RADPROT_DTLS)
tlsreloadcrls();
#endif
break;
case SIGPIPE:
debug(DBG_WARN, "sighandler: got SIGPIPE, TLS write error?");
Expand Down
17 changes: 17 additions & 0 deletions tlscommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,23 @@ SSL_CTX *tlsgetctx(uint8_t type, struct tls *t) {
return NULL;
}

void tlsreloadcrls() {
struct tls *conf;
struct hash_entry *entry;

for(entry = hash_first(tlsconfs); entry; entry = hash_next(entry)) {
conf = (struct tls *)entry->data;
#ifdef RADPROT_TLS
if(conf->tlsctx)
tlsaddcacrl(conf->tlsctx, conf);
#endif
#ifdef RADPROT_DTLS
if(conf->dtlsctx)
tlsaddcacrl(conf->dtlsctx, conf);
#endif
}
}

X509 *verifytlscert(SSL *ssl) {
X509 *cert;
unsigned long error;
Expand Down
1 change: 1 addition & 0 deletions tlscommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ X509 *verifytlscert(SSL *ssl);
int verifyconfcert(X509 *cert, struct clsrvconf *conf);
int conftls_cb(struct gconffile **cf, void *arg, char *block, char *opt, char *val);
int addmatchcertattr(struct clsrvconf *conf);
void tlsreloadcrls();
#endif

/* Local Variables: */
Expand Down

0 comments on commit 4f223d3

Please sign in to comment.