From 29cd56606192c9e1aad7b251ef238e14d53474b7 Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Fri, 19 Apr 2024 23:57:03 -0600 Subject: [PATCH] Remove legacy plugin tests (#34) * Remove legacy plugin tests * fix * oops * just remove the test --- test/runtests.jl | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index d820ce3..707a89f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -460,15 +460,9 @@ end # https://www.openssl.org/docs/man3.0/man7/OSSL_PROVIDER-legacy.html @testset "Encrypt" begin - if OpenSSL.version_number() ≥ v"3" - OpenSSL.load_legacy_provider() - end evp_ciphers = [ EvpEncNull(), - EvpBlowFishCBC(), # legacy - EvpBlowFishECB(), # legacy #EvpBlowFishCFB(), // not supported - EvpBlowFishOFB(), # legacy EvpAES128CBC(), EvpAES128ECB(), #EvpAES128CFB(), // not supported @@ -503,38 +497,6 @@ end end end -@testset "EncryptCustomKey" begin - # EvpBlowFishECB is legacy, consider using EvpAES128ECB instead - if OpenSSL.version_number() ≥ v"3" - OpenSSL.load_legacy_provider() - end - evp_cipher = EvpBlowFishECB() - sym_key = random_bytes(evp_cipher.key_length ÷ 2) - init_vector = random_bytes(evp_cipher.init_vector_length ÷ 2) - - enc_evp_cipher_ctx = EvpCipherContext() - encrypt_init(enc_evp_cipher_ctx, evp_cipher, sym_key, init_vector) - - dec_evp_cipher_ctx = EvpCipherContext() - decrypt_init(dec_evp_cipher_ctx, evp_cipher, sym_key, init_vector) - - in_string = "OpenSSL Julia" - in_data = IOBuffer(in_string) - enc_data = IOBuffer() - - cipher(enc_evp_cipher_ctx, in_data, enc_data) - seek(enc_data, 0) - @show String(read(enc_data)) - seek(enc_data, 0) - - dec_data = IOBuffer() - cipher(dec_evp_cipher_ctx, enc_data, dec_data) - out_data = take!(dec_data) - out_string = String(out_data) - - @test in_string == out_string -end - @testset "StackOf{X509Extension}" begin ext1 = X509Extension("subjectAltName", "DNS:openssl.jl.com") ext2 = X509Extension("keyUsage", "digitalSignature, keyEncipherment, keyAgreement")