Skip to content

Commit

Permalink
Add openssl backwards compatibility (#1493)
Browse files Browse the repository at this point in the history
Make Md5LookupGetBySubject function compatible with openssl 1.x

Relates-To:  OLPEDGE-2876

Signed-off-by: Mykhailo Kuchma <[email protected]>
  • Loading branch information
mykhailo-kuchma committed Apr 2, 2024
1 parent 93bf554 commit 2f2718d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions olp-cpp-sdk-core/src/http/curl/NetworkCurl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@ int Md5LookupCtrl(X509_LOOKUP* ctx, int, const char*, long, char**) {
return 1;
}

#if OPENSSL_VERSION_NUMBER >= 0x30100000L
int Md5LookupGetBySubject(X509_LOOKUP* ctx, X509_LOOKUP_TYPE type,
const X509_NAME* name, X509_OBJECT* ret) {
#else
int Md5LookupGetBySubject(X509_LOOKUP* ctx, X509_LOOKUP_TYPE type,
X509_NAME* name, X509_OBJECT* ret) {
#endif
if (type != X509_LU_X509) {
OLP_SDK_LOG_ERROR_F(kLogTag, "Unsupported lookup type, type=%d", type);
return 0;
Expand Down

0 comments on commit 2f2718d

Please sign in to comment.