| Server IP : 82.208.35.60 / Your IP : 216.73.217.33 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/devel/cbang/files/ |
Upload File : |
--- src/cbang/openssl/KeyContext.cpp.orig 2022-09-17 22:00:36 UTC
+++ src/cbang/openssl/KeyContext.cpp
@@ -121,8 +121,18 @@ void KeyContext::setRSAPubExp(uint64_t exp) {
BigNum num;
num.set(exp);
- if (EVP_PKEY_CTX_set1_rsa_keygen_pubexp(ctx, num.get()) <= 0)
+#if OPENSSL_VERSION_NUMBER < 0x3000000fL
+ int ret = EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, num.get());
+#else
+ int ret = EVP_PKEY_CTX_set1_rsa_keygen_pubexp(ctx, num.get());
+#endif
+
+ if (ret <= 0)
THROW("Failed to set RSA public exponent: " << SSL::getErrorStr());
+
+#if OPENSSL_VERSION_NUMBER < 0x3000000fL
+ num.adopt(); // Don't deallocate
+#endif
}