Skip to content

Fix build on CentOS 7 #7

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

Merged
merged 2 commits into from
Jul 11, 2022
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
8 changes: 8 additions & 0 deletions shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,19 @@ int X_SSL_CTX_new_index() {
}

int X_SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version) {
#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
return SSL_CTX_set_min_proto_version(ctx, version);
#else
return 0;
#endif
}

int X_SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version) {
#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
return SSL_CTX_set_max_proto_version(ctx, version);
#else
return 0;
#endif
}

long X_SSL_CTX_set_options(SSL_CTX* ctx, long options) {
Expand Down
5 changes: 4 additions & 1 deletion shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ extern int X_SSL_verify_cb(int ok, X509_STORE_CTX* store);

/* SSL_CTX methods */
extern int X_SSL_CTX_new_index();
#ifndef TLS1_3_VERSION
#define TLS1_3_VERSION 0
#endif
extern int X_SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
extern int X_SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
extern long X_SSL_CTX_set_options(SSL_CTX* ctx, long options);
Expand Down Expand Up @@ -181,4 +184,4 @@ extern int OBJ_create(const char *oid,const char *sn,const char *ln);

/* Extension helper method */
extern const unsigned char * get_extention(X509 *x, int NID, int *data_len);
extern int add_custom_ext(X509 *cert, int nid, char *value, int len);
extern int add_custom_ext(X509 *cert, int nid, char *value, int len);