Commit 721e0a94 authored by PhoeniX's avatar PhoeniX

Verbose error logs

parent 9e44ba71
......@@ -139,16 +139,24 @@ int main(int argc, const char * argv[]) {
printf("Loading keys...");
{
FILE *fp;
fp = fopen(cakeyf, "r");
PEM_read_RSAPrivateKey(fp, &cakey, 0, 0);
if (!cakey) d2i_RSAPrivateKey_fp(fp, &cakey);
if (!cakey) return 1;
fclose(fp);
fp = fopen(cacerf, "r");
if (!fp) {
printf(" cert error %d (%s)\n",errno,cacerf);
return 1;
}
PEM_read_X509(fp, &cacer, 0, 0);
if (!cacer) d2i_X509_fp(fp, &cacer);
if (!cacer) return 1;
fclose(fp);
fp = fopen(cakeyf, "r");
if (!fp) {
printf(" key error %d (%s)\n",errno,cacerf);
return 1;
}
PEM_read_RSAPrivateKey(fp, &cakey, 0, 0);
if (!cakey) d2i_RSAPrivateKey_fp(fp, &cakey);
if (!cakey) return 1;
fclose(fp);
printf(" [ DONE ]\n");
}
printf("Starting server...");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment