mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
parent
cb49ac1264
commit
a8cc0a601b
@ -208,6 +208,10 @@ void JsonRpcConnection::CertificateRequestResponseHandler(const Dictionary::Ptr&
|
|||||||
cafp << ca;
|
cafp << ca;
|
||||||
cafp.close();
|
cafp.close();
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
_unlink(caPath.CStr());
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
if (rename(tempCaPath.CStr(), caPath.CStr()) < 0) {
|
if (rename(tempCaPath.CStr(), caPath.CStr()) < 0) {
|
||||||
BOOST_THROW_EXCEPTION(posix_error()
|
BOOST_THROW_EXCEPTION(posix_error()
|
||||||
<< boost::errinfo_api_function("rename")
|
<< boost::errinfo_api_function("rename")
|
||||||
@ -222,6 +226,10 @@ void JsonRpcConnection::CertificateRequestResponseHandler(const Dictionary::Ptr&
|
|||||||
certfp << cert;
|
certfp << cert;
|
||||||
certfp.close();
|
certfp.close();
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
_unlink(certPath.CStr());
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
if (rename(tempCertPath.CStr(), certPath.CStr()) < 0) {
|
if (rename(tempCertPath.CStr(), certPath.CStr()) < 0) {
|
||||||
BOOST_THROW_EXCEPTION(posix_error()
|
BOOST_THROW_EXCEPTION(posix_error()
|
||||||
<< boost::errinfo_api_function("rename")
|
<< boost::errinfo_api_function("rename")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user