Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/OpenSSL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}, ()))

Expand All @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading