Follow-up to r1896361.
Use a cleaner solution.
@@ -2966,14 +2966,13 @@ static const char *ct_static_scts(cmd_parms *cmd, void *x, const char *cert_fn,
}
cert = PEM_read_X509(pemfile, NULL, NULL, NULL);
- if (!cert) {
fclose(pemfile);
+
+ if (!cert) {
return apr_psprintf(p, "could not read certificate from file %s",
cert_fn);
}
- fclose(pemfile);
-
fingerprint = get_cert_fingerprint(p, cert);
X509_free(cert);
