Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(openssl): fix build with OPENSSL_NO_DEPRECATED #3339

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
#include "crypto.h"
#include <openssl/pem.h>
#include <openssl/rsa.h>

namespace crypto {
using asn1_string_t = util::safe_ptr<ASN1_STRING, ASN1_STRING_free>;
Expand Down
8 changes: 7 additions & 1 deletion src/nvhttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,13 @@

// Verify certificates after establishing connection
https_server.verify = [add_cert](SSL *ssl) {
crypto::x509_t x509 { SSL_get_peer_certificate(ssl) };
crypto::x509_t x509 {

Check warning on line 1036 in src/nvhttp.cpp

View check run for this annotation

Codecov / codecov/patch

src/nvhttp.cpp#L1036

Added line #L1036 was not covered by tests
#if OPENSSL_VERSION_MAJOR >= 3
ReenigneArcher marked this conversation as resolved.
Show resolved Hide resolved
SSL_get1_peer_certificate(ssl)

Check warning on line 1038 in src/nvhttp.cpp

View check run for this annotation

Codecov / codecov/patch

src/nvhttp.cpp#L1038

Added line #L1038 was not covered by tests
#else
SSL_get_peer_certificate(ssl)
#endif
};
if (!x509) {
BOOST_LOG(info) << "unknown -- denied"sv;
return 0;
Expand Down
Loading