@@ -5042,6 +5042,18 @@ mod_openssl_refresh_plugin_ssl_ctx (server * const srv, plugin_ssl_ctx * const s
50425042}
50435043
50445044
5045+ __attribute_cold__
5046+ static int
5047+ mod_openssl_refresh_plugin_cert_fail (server * const srv , plugin_cert * const pc )
5048+ {
5049+ log_perror (srv -> errh , __FILE__ , __LINE__ ,
5050+ "SSL: unable to check/refresh cert key; "
5051+ "continuing to use already-loaded %s" ,
5052+ pc -> ssl_privkey -> ptr );
5053+ return 0 ;
5054+ }
5055+
5056+
50455057static int
50465058mod_openssl_refresh_plugin_cert (server * const srv , plugin_cert * const pc )
50475059{
@@ -5069,15 +5081,17 @@ mod_openssl_refresh_plugin_cert (server * const srv, plugin_cert * const pc)
50695081 * update privkey last, after pem file (and OCSP stapling file) */
50705082 struct stat st ;
50715083 if (0 != stat (pc -> ssl_privkey -> ptr , & st ))
5072- return 0 ; /* ignore if stat() error; keep using existing crt/pk */
5084+ return mod_openssl_refresh_plugin_cert_fail (srv , pc );
5085+ /* ignore if stat() error; keep using existing crt/pk */
50735086 if (TIME64_CAST (st .st_mtime ) <= pc -> pkey_ts )
50745087 return 0 ; /* mtime match; no change */
50755088
50765089 plugin_cert * npc =
50775090 network_openssl_load_pemfile (srv , pc -> ssl_pemfile , pc -> ssl_privkey ,
50785091 pc -> ssl_stapling_file );
50795092 if (NULL == npc )
5080- return 0 ; /* ignore if crt/pk error; keep using existing crt/pk */
5093+ return mod_openssl_refresh_plugin_cert_fail (srv , pc );
5094+ /* ignore if crt/pk error; keep using existing crt/pk */
50815095
50825096 /*(future: if threaded, only one thread should update pcs)*/
50835097
0 commit comments