Skip to content

Commit 4cc19a4

Browse files
committed
Define TLS1_3_VERSION as invalid value if missed
The patch fixes build with OpenSSL < 1.1.1: ./ctx.go:372:28: could not determine kind of name for C.TLS1_3_VERSION
1 parent be4921a commit 4cc19a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shim.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ extern int X_SSL_verify_cb(int ok, X509_STORE_CTX* store);
6767

6868
/* SSL_CTX methods */
6969
extern int X_SSL_CTX_new_index();
70+
#ifndef TLS1_3_VERSION
71+
#define TLS1_3_VERSION 0
72+
#endif
7073
extern int X_SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
7174
extern int X_SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
7275
extern long X_SSL_CTX_set_options(SSL_CTX* ctx, long options);
@@ -181,4 +184,4 @@ extern int OBJ_create(const char *oid,const char *sn,const char *ln);
181184

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

0 commit comments

Comments
 (0)