@@ -295,11 +295,11 @@ def test_openssl_version(self):
295295 # Some sanity checks follow
296296 # >= 0.9
297297 self .assertGreaterEqual (n , 0x900000 )
298- # < 2 .0
299- self .assertLess (n , 0x20000000 )
298+ # < 3 .0
299+ self .assertLess (n , 0x30000000 )
300300 major , minor , fix , patch , status = t
301301 self .assertGreaterEqual (major , 0 )
302- self .assertLess (major , 2 )
302+ self .assertLess (major , 3 )
303303 self .assertGreaterEqual (minor , 0 )
304304 self .assertLess (minor , 256 )
305305 self .assertGreaterEqual (fix , 0 )
@@ -308,9 +308,13 @@ def test_openssl_version(self):
308308 self .assertLessEqual (patch , 26 )
309309 self .assertGreaterEqual (status , 0 )
310310 self .assertLessEqual (status , 15 )
311- # Version string as returned by OpenSSL, the format might change
312- self .assertTrue (s .startswith ("OpenSSL {:d}.{:d}.{:d}" .format (major , minor , fix )),
313- (s , t ))
311+ # Version string as returned by {Open,Libre}SSL, the format might change
312+ if "LibreSSL" in s :
313+ self .assertTrue (s .startswith ("LibreSSL {:d}.{:d}" .format (major , minor )),
314+ (s , t ))
315+ else :
316+ self .assertTrue (s .startswith ("OpenSSL {:d}.{:d}.{:d}" .format (major , minor , fix )),
317+ (s , t ))
314318
315319 @support .cpython_only
316320 def test_refcycle (self ):
0 commit comments