File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -197,9 +197,14 @@ shared static this() {
197
197
init_matrix[Version(2 ,0 )] = &openssl.init1_1;
198
198
init_matrix[Version(0 ,2 )] = &openssl.init1_1; // libressl >= 2.7.1
199
199
init_matrix[Version(0 ,3 )] = &openssl.init1_1; // libressl >= 3.0.0
200
- init_matrix[Version(3 ,0 )] = &openssl.init1_1; // 3.0.0
201
- init_matrix[Version(3 ,1 )] = &openssl.init1_1; // 3.1
202
- auto init = init_matrix.get (openssl._ver, null );
200
+ init_matrix[Version(3 ,0 )] = &openssl.init1_1; // >=3.0
201
+ auto initVer = (ver) {
202
+ if (ver.major == 3 && ver.minor >= 1 ) // set 3.x to 3.0 for the init matrix
203
+ return Version (3 , 0 );
204
+ else
205
+ return ver;
206
+ }(openssl._ver);
207
+ auto init = init_matrix.get (initVer, null );
203
208
if ( init is null ) {
204
209
throw new Exception (" loading openssl: unknown version %s for init" .format(openssl._ver));
205
210
}
You can’t perform that action at this time.
0 commit comments