golang/SOURCES/update-api-openssl3.patch

27 lines
1.0 KiB
Diff

diff --git a/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h b/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h
index ac6c64f86d..e908c1385b 100644
--- a/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h
+++ b/src/vendor/github.com/golang-fips/openssl/openssl/goopenssl.h
@@ -825,6 +825,9 @@ _goboringcrypto_EVP_PKEY_CTX_set_rsa_keygen_bits(GO_EVP_PKEY_CTX *ctx, int mbits
mbits, NULL);
}
+
+
+#if OPENSSL_VERSION_NUMBER < 0x30000000
static inline int
_goboringcrypto_EVP_PKEY_CTX_set_rsa_keygen_pubexp(GO_EVP_PKEY_CTX *ctx, GO_BIGNUM *pubexp) {
return _goboringcrypto_EVP_PKEY_CTX_ctrl(ctx, -1,
@@ -832,6 +835,11 @@ _goboringcrypto_EVP_PKEY_CTX_set_rsa_keygen_pubexp(GO_EVP_PKEY_CTX *ctx, GO_BIGN
EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP,
0, pubexp);
}
+#else
+DEFINEFUNC(int, EVP_PKEY_CTX_set_rsa_keygen_pubexp,
+ (GO_EVP_PKEY_CTX *ctx, GO_BIGNUM *pubexp),
+ (ctx, pubexp))
+#endif
static inline int
_goboringcrypto_EVP_PKEY_CTX_set_ec_paramgen_curve_nid(GO_EVP_PKEY_CTX *ctx, int nid) {