Lines Matching refs:pc
86 plugin_cert *pc; member
111 plugin_cert *pc; member
649 plugin_cert *pc = cpv->v.v; in mod_gnutls_free_config() local
650 gnutls_certificate_free_credentials(pc->ssl_cred); in mod_gnutls_free_config()
651 mod_gnutls_free_config_crts(pc->ssl_pemfile_x509); in mod_gnutls_free_config()
652 gnutls_privkey_deinit(pc->ssl_pemfile_pkey); in mod_gnutls_free_config()
653 free(pc); in mod_gnutls_free_config()
688 pconf->pc = cpv->v.v; in mod_gnutls_merge_config_cpv()
781 if (hctx->conf.pc->trust_inited) return GNUTLS_E_SUCCESS; in mod_gnutls_verify_set_tlist()
833 gnutls_certificate_credentials_t ssl_cred = hctx->conf.pc->ssl_cred; in mod_gnutls_verify_set_tlist()
838 hctx->conf.pc->trust_inited = 1; in mod_gnutls_verify_set_tlist()
919 mod_gnutls_ocsp_next_update (plugin_cert *pc, log_error_st *errh) in mod_gnutls_ocsp_next_update() argument
922 int rc = mod_gnutls_load_file(pc->ssl_stapling_file->ptr, &f, errh); in mod_gnutls_ocsp_next_update()
941 mod_gnutls_expire_stapling_file (server *srv, plugin_cert *pc) in mod_gnutls_expire_stapling_file() argument
948 if (pc->must_staple) in mod_gnutls_expire_stapling_file()
952 pc->ssl_stapling_file->ptr); in mod_gnutls_expire_stapling_file()
957 mod_gnutls_reload_stapling_file (server *srv, plugin_cert *pc, const unix_time64_t cur_ts) in mod_gnutls_reload_stapling_file() argument
965 time_t nextupd = mod_gnutls_ocsp_next_update(pc, srv->errh); in mod_gnutls_reload_stapling_file()
987 gnutls_certificate_set_flags(pc->ssl_cred, in mod_gnutls_reload_stapling_file()
991 const char *fn = pc->ssl_stapling_file->ptr; in mod_gnutls_reload_stapling_file()
992 int rc = gnutls_certificate_set_ocsp_status_request_file(pc->ssl_cred,fn,0); in mod_gnutls_reload_stapling_file()
998 gnutls_certificate_get_ocsp_expiration(pc->ssl_cred, 0, 0, 0); in mod_gnutls_reload_stapling_file()
1002 pc->ssl_stapling_loadts = cur_ts; in mod_gnutls_reload_stapling_file()
1003 pc->ssl_stapling_nextts = nextupd; in mod_gnutls_reload_stapling_file()
1004 if (pc->ssl_stapling_nextts == -1) { in mod_gnutls_reload_stapling_file()
1008 pc->ssl_stapling_nextts = cur_ts + 3600; in mod_gnutls_reload_stapling_file()
1009 pc->ssl_stapling_loadts = 0; in mod_gnutls_reload_stapling_file()
1011 else if (pc->ssl_stapling_nextts < cur_ts) in mod_gnutls_reload_stapling_file()
1012 mod_gnutls_expire_stapling_file(srv, pc); in mod_gnutls_reload_stapling_file()
1019 mod_gnutls_refresh_stapling_file (server *srv, plugin_cert *pc, const unix_time64_t cur_ts) in mod_gnutls_refresh_stapling_file() argument
1021 if (pc->ssl_stapling_nextts > cur_ts + 256) in mod_gnutls_refresh_stapling_file()
1024 if (0 != stat(pc->ssl_stapling_file->ptr, &st) in mod_gnutls_refresh_stapling_file()
1025 || TIME64_CAST(st.st_mtime) <= pc->ssl_stapling_loadts) { in mod_gnutls_refresh_stapling_file()
1026 if (pc->ssl_stapling_nextts < cur_ts) in mod_gnutls_refresh_stapling_file()
1027 mod_gnutls_expire_stapling_file(srv, pc); in mod_gnutls_refresh_stapling_file()
1030 return mod_gnutls_reload_stapling_file(srv, pc, cur_ts); in mod_gnutls_refresh_stapling_file()
1046 plugin_cert *pc = cpv->v.v; in mod_gnutls_refresh_stapling_files() local
1047 if (pc->ssl_stapling_file) in mod_gnutls_refresh_stapling_files()
1048 mod_gnutls_refresh_stapling_file(srv, pc, cur_ts); in mod_gnutls_refresh_stapling_files()
1109 mod_gnutls_construct_crt_chain (plugin_cert *pc, gnutls_datum_t *d, log_error_st *errh) in mod_gnutls_construct_crt_chain() argument
1122 unsigned int off = (d == pc->ssl_pemfile_x509) ? 0 : 1; in mod_gnutls_construct_crt_chain()
1135 (gnutls_x509_crt_t *)(void *)pc->ssl_pemfile_x509->data; in mod_gnutls_construct_crt_chain()
1155 pc->ssl_pemfile_pkey); in mod_gnutls_construct_crt_chain()
1170 pc->ssl_pemfile_pkey = NULL; in mod_gnutls_construct_crt_chain()
1171 pc->ssl_cred = ssl_cred; in mod_gnutls_construct_crt_chain()
1174 mod_gnutls_free_config_crts(pc->ssl_pemfile_x509); in mod_gnutls_construct_crt_chain()
1175 pc->ssl_pemfile_x509 = NULL; in mod_gnutls_construct_crt_chain()
1203 plugin_cert *pc = ck_malloc(sizeof(plugin_cert)); in network_gnutls_load_pemfile()
1204 pc->ssl_cred = ssl_cred; in network_gnutls_load_pemfile()
1205 pc->trust_inited = 0; in network_gnutls_load_pemfile()
1207 return pc; in network_gnutls_load_pemfile()
1224 plugin_cert *pc = ck_malloc(sizeof(plugin_cert)); in network_gnutls_load_pemfile() local
1225 pc->ssl_cred = NULL; in network_gnutls_load_pemfile()
1226 pc->trust_inited = 0; in network_gnutls_load_pemfile()
1227 pc->ssl_pemfile_x509 = d; in network_gnutls_load_pemfile()
1228 pc->ssl_pemfile_pkey = pkey; in network_gnutls_load_pemfile()
1229 pc->ssl_stapling_file= ssl_stapling_file; in network_gnutls_load_pemfile()
1230 pc->ssl_stapling_loadts = 0; in network_gnutls_load_pemfile()
1231 pc->ssl_stapling_nextts = 0; in network_gnutls_load_pemfile()
1232 pc->must_staple = in network_gnutls_load_pemfile()
1236 int rc = mod_gnutls_construct_crt_chain(pc, d, srv->errh); in network_gnutls_load_pemfile()
1240 free(pc); in network_gnutls_load_pemfile()
1245 if (pc->ssl_stapling_file) { in network_gnutls_load_pemfile()
1246 if (mod_gnutls_reload_stapling_file(srv, pc, log_epoch_secs) < 0) { in network_gnutls_load_pemfile()
1250 else if (pc->must_staple) { in network_gnutls_load_pemfile()
1257 pc->notAfter = TIME64_CAST(gnutls_x509_crt_get_expiration_time( in network_gnutls_load_pemfile()
1261 return pc; in network_gnutls_load_pemfile()
1343 plugin_cert pc; in mod_gnutls_acme_tls_1() local
1344 pc.ssl_cred = NULL; in mod_gnutls_acme_tls_1()
1345 pc.trust_inited = 0; in mod_gnutls_acme_tls_1()
1346 pc.ssl_pemfile_x509 = d; in mod_gnutls_acme_tls_1()
1347 pc.ssl_pemfile_pkey = pkey; in mod_gnutls_acme_tls_1()
1349 rc = mod_gnutls_construct_crt_chain(&pc, d, errh); in mod_gnutls_acme_tls_1()
1356 gnutls_certificate_credentials_t ssl_cred = pc.ssl_cred; in mod_gnutls_acme_tls_1()
1598 if (NULL == hctx->conf.pc->ssl_cred) { in mod_gnutls_client_hello_hook()
1599 rc = mod_gnutls_construct_crt_chain(hctx->conf.pc, in mod_gnutls_client_hello_hook()
1605 gnutls_certificate_credentials_t ssl_cred = hctx->conf.pc->ssl_cred; in mod_gnutls_client_hello_hook()
1986 conf.pc = cpv->v.v; in mod_gnutls_set_defaults_sockets()
2004 if (NULL == conf.pc) { in mod_gnutls_set_defaults_sockets()