diff --git a/src/OpenSSL.jl b/src/OpenSSL.jl index 976fb9a..6bb0968 100644 --- a/src/OpenSSL.jl +++ b/src/OpenSSL.jl @@ -1172,7 +1172,7 @@ end EvpMDNull()::EvpDigest = EvpDigest(ccall((:EVP_md_null, libcrypto), Ptr{Cvoid}, ())) -EvpMD2()::EvpDigest = EvpDigest(ccall((:EVP_md2, libcrypto), Ptr{Cvoid}, ())) +EvpMD2()::EvpDigest = error("MD2 is not available in OpenSSL 1.1 and later") EvpMD5()::EvpDigest = EvpDigest(ccall((:EVP_md5, libcrypto), Ptr{Cvoid}, ())) @@ -1186,7 +1186,7 @@ EvpSHA384()::EvpDigest = EvpDigest(ccall((:EVP_sha384, libcrypto), Ptr{Cvoid}, ( EvpSHA512()::EvpDigest = EvpDigest(ccall((:EVP_sha512, libcrypto), Ptr{Cvoid}, ())) -EvpDSS1()::EvpDigest = EvpDigest(ccall((:EVP_dss1, libcrypto), Ptr{Cvoid}, ())) +EvpDSS1()::EvpDigest = error("DSS1 was removed in OpenSSL 1.1; use EvpSHA1() with DSA keys") """ EVP Message Digest Context. diff --git a/test/runtests.jl b/test/runtests.jl index 15479d2..1b48d4c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -270,6 +270,8 @@ end end @testset "Hash" begin + @test_throws ErrorException EvpMD2() + @test_throws ErrorException EvpDSS1() res = digest(EvpMD5(), IOBuffer("The quick brown fox jumps over the lazy dog")) @test res == UInt8[0x9e, 0x10, 0x7d, 0x9d, 0x37, 0x2b, 0xb6, 0x82, 0x6b, 0xd8, 0x1d, 0x35, 0x42, 0xa4, 0x19, 0xd6] end