Skip to content

Commit 2f2718d

Browse files
Add openssl backwards compatibility (#1493)
Make Md5LookupGetBySubject function compatible with openssl 1.x Relates-To: OLPEDGE-2876 Signed-off-by: Mykhailo Kuchma <ext-mykhailo.kuchma@here.com>
1 parent 93bf554 commit 2f2718d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

olp-cpp-sdk-core/src/http/curl/NetworkCurl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@ int Md5LookupCtrl(X509_LOOKUP* ctx, int, const char*, long, char**) {
6666
return 1;
6767
}
6868

69+
#if OPENSSL_VERSION_NUMBER >= 0x30100000L
6970
int Md5LookupGetBySubject(X509_LOOKUP* ctx, X509_LOOKUP_TYPE type,
7071
const X509_NAME* name, X509_OBJECT* ret) {
72+
#else
73+
int Md5LookupGetBySubject(X509_LOOKUP* ctx, X509_LOOKUP_TYPE type,
74+
X509_NAME* name, X509_OBJECT* ret) {
75+
#endif
7176
if (type != X509_LU_X509) {
7277
OLP_SDK_LOG_ERROR_F(kLogTag, "Unsupported lookup type, type=%d", type);
7378
return 0;

0 commit comments

Comments
 (0)