X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fcrypto%2Fserv_crypto.c;h=820153126fceef45b3d7170b58e28f6631ff95f6;hb=a14993160a97c3092d3bd6d015b06021a8ed6171;hp=a9dd5934bc58e357ad62878c3edc20b263462d53;hpb=5bcb36c908199452c652b3592126896320c57617;p=citadel.git diff --git a/citadel/modules/crypto/serv_crypto.c b/citadel/modules/crypto/serv_crypto.c index a9dd5934b..820153126 100644 --- a/citadel/modules/crypto/serv_crypto.c +++ b/citadel/modules/crypto/serv_crypto.c @@ -198,9 +198,11 @@ void init_ssl(void) } /* - * Generate a CSR if we don't have one. + * If there is no certificate file on disk, we will be generating a self-signed certificate + * in the next step. Therefore, if we have neither a CSR nor a certificate, generate + * the CSR in this step so that the next step may commence. */ - if (access(file_crpt_file_csr, R_OK) != 0) { + if ( (access(file_crpt_file_cer, R_OK) != 0) && (access(file_crpt_file_csr, R_OK) != 0) ) { lprintf(CTDL_INFO, "Generating a certificate signing request.\n"); /*