@@ -246,9 +246,9 @@ def library_recipes():
246
246
247
247
result .extend ([
248
248
dict (
249
- name = "OpenSSL 1.1.1n " ,
250
- url = "https://www.openssl.org/source/openssl-1.1.1n .tar.gz" ,
251
- checksum = '2aad5635f9bb338bc2c6b7d19cbc9676 ' ,
249
+ name = "OpenSSL 1.1.1q " ,
250
+ url = "https://www.openssl.org/source/openssl-1.1.1q .tar.gz" ,
251
+ checksum = 'd7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca ' ,
252
252
buildrecipe = build_universal_openssl ,
253
253
configure = None ,
254
254
install = None ,
@@ -796,10 +796,16 @@ def verifyThirdPartyFile(url, checksum, fname):
796
796
print ("Downloading %s" % (name ,))
797
797
downloadURL (url , fname )
798
798
print ("Archive for %s stored as %s" % (name , fname ))
799
+ if len (checksum ) == 32 :
800
+ algo = 'md5'
801
+ elif len (checksum ) == 64 :
802
+ algo = 'sha256'
803
+ else :
804
+ raise ValueError (checksum )
799
805
if os .system (
800
- 'MD5 =$(openssl md5 %s) ; test "${MD5 ##*= }" = "%s"'
801
- % (shellQuote (fname ), checksum ) ):
802
- fatal ('MD5 checksum mismatch for file %s' % fname )
806
+ 'CHECKSUM =$(openssl %s %s) ; test "${CHECKSUM ##*= }" = "%s"'
807
+ % (algo , shellQuote (fname ), checksum ) ):
808
+ fatal ('%s checksum mismatch for file %s' % ( algo , fname ) )
803
809
804
810
def build_universal_openssl (basedir , archList ):
805
811
"""
0 commit comments