Skip to content

Commit 02388fd

Browse files
committed
Allow building with LibreSSL
When using LibreSSL, don't use APIs that are only in OpenSSL 1.1.x.
1 parent 6e83a08 commit 02388fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scitokens_internal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ rs256_from_coords(const std::string &e_str, const std::string &n_str) {
288288
std::unique_ptr<BIGNUM, decltype(&BN_free)> n_bignum(BN_bin2bn(reinterpret_cast<const unsigned char *>(n_decode.c_str()), n_decode.size(), nullptr), BN_free);
289289

290290
std::unique_ptr<RSA, decltype(&RSA_free)> rsa(RSA_new(), RSA_free);
291-
#if OPENSSL_VERSION_NUMBER < 0x10100000L
291+
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
292292
rsa->e = e_bignum.get();
293293
rsa->n = n_bignum.get();
294294
rsa->d = nullptr;

0 commit comments

Comments
 (0)