|
|
|
@ -657,17 +657,17 @@ int sxhub_setsslserts(sxhub_t *ssys, const char *rootca,
|
|
|
|
|
/* check on existence of certificate files */
|
|
|
|
|
if (access(rootca, R_OK) == -1) {
|
|
|
|
|
ssys->log(SXERROR_LOG, "Unable to read rootca file '%s': %s\n",
|
|
|
|
|
rootca, sys_errlist[errno]);
|
|
|
|
|
rootca, strerror(errno));
|
|
|
|
|
return ENOENT;
|
|
|
|
|
}
|
|
|
|
|
if (access(certpem, R_OK) == -1) {
|
|
|
|
|
ssys->log(SXERROR_LOG, "Unable to read certpem file '%s': %s\n",
|
|
|
|
|
certpem, sys_errlist[errno]);
|
|
|
|
|
certpem, strerror(errno));
|
|
|
|
|
return ENOENT;
|
|
|
|
|
}
|
|
|
|
|
if (access(certkey, R_OK) == -1) {
|
|
|
|
|
ssys->log(SXERROR_LOG, "Unable to read certkey file '%s': %s\n",
|
|
|
|
|
certkey, sys_errlist[errno]);
|
|
|
|
|
certkey, strerror(errno));
|
|
|
|
|
return ENOENT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -675,19 +675,19 @@ int sxhub_setsslserts(sxhub_t *ssys, const char *rootca,
|
|
|
|
|
int r;
|
|
|
|
|
if (NULL == (ssys->rootca = realpath(rootca, NULL))) {
|
|
|
|
|
ssys->log(SXERROR_LOG, "Unable to obtain the full path of '%s': %s\n",
|
|
|
|
|
rootca, sys_errlist[errno]);
|
|
|
|
|
rootca, strerror(errno));
|
|
|
|
|
if (errno == ENOMEM) r = errno;
|
|
|
|
|
goto __fail;
|
|
|
|
|
}
|
|
|
|
|
if (NULL == (ssys->certpem = realpath(certpem, NULL))) {
|
|
|
|
|
ssys->log(SXERROR_LOG, "Unable to obtain the full path of '%s': %s\n",
|
|
|
|
|
certpem, sys_errlist[errno]);
|
|
|
|
|
certpem, strerror(errno));
|
|
|
|
|
if (errno == ENOMEM) r = errno;
|
|
|
|
|
goto __fail;
|
|
|
|
|
}
|
|
|
|
|
if (NULL == (ssys->certkey = realpath(certkey, NULL))) {
|
|
|
|
|
ssys->log(SXERROR_LOG, "Unable to obtain the full path of '%s': %s\n",
|
|
|
|
|
certkey, sys_errlist[errno]);
|
|
|
|
|
certkey, strerror(errno));
|
|
|
|
|
if (errno == ENOMEM) r = errno;
|
|
|
|
|
goto __fail;
|
|
|
|
|
}
|
|
|
|
|