|
|
@ -20,7 +20,7 @@ namespace data |
|
|
|
|
|
|
|
|
|
|
|
void Families::LoadCertificate (const std::string& filename) |
|
|
|
void Families::LoadCertificate (const std::string& filename) |
|
|
|
{ |
|
|
|
{ |
|
|
|
SSL_CTX * ctx = SSL_CTX_new (TLSv1_method ()); |
|
|
|
SSL_CTX * ctx = SSL_CTX_new (TLS_method ()); |
|
|
|
int ret = SSL_CTX_use_certificate_file (ctx, filename.c_str (), SSL_FILETYPE_PEM); |
|
|
|
int ret = SSL_CTX_use_certificate_file (ctx, filename.c_str (), SSL_FILETYPE_PEM); |
|
|
|
if (ret) |
|
|
|
if (ret) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -135,7 +135,7 @@ namespace data |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto filename = i2p::fs::DataDirPath("family", (family + ".key")); |
|
|
|
auto filename = i2p::fs::DataDirPath("family", (family + ".key")); |
|
|
|
std::string sig; |
|
|
|
std::string sig; |
|
|
|
SSL_CTX * ctx = SSL_CTX_new (TLSv1_method ()); |
|
|
|
SSL_CTX * ctx = SSL_CTX_new (TLS_method ()); |
|
|
|
int ret = SSL_CTX_use_PrivateKey_file (ctx, filename.c_str (), SSL_FILETYPE_PEM); |
|
|
|
int ret = SSL_CTX_use_PrivateKey_file (ctx, filename.c_str (), SSL_FILETYPE_PEM); |
|
|
|
if (ret) |
|
|
|
if (ret) |
|
|
|
{ |
|
|
|
{ |
|
|
|