Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0458-public_key-Omit-some-tests-if-unsupported-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0458-public_key-Omit-some-tests-if-unsupported-alg.patch of Package erlang
From 0f301ccfe24986ba9ef9d0f83c6567acfcf29cd3 Mon Sep 17 00:00:00 2001 From: Hans Nilsson <hans@erlang.org> Date: Fri, 26 Aug 2022 14:43:15 +0200 Subject: [PATCH 2/2] public_key: Omit some tests if unsupported alg --- lib/public_key/test/pbe_SUITE.erl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/public_key/test/pbe_SUITE.erl b/lib/public_key/test/pbe_SUITE.erl index 4745698293..3e6e9c9c3f 100644 --- a/lib/public_key/test/pbe_SUITE.erl +++ b/lib/public_key/test/pbe_SUITE.erl @@ -219,12 +219,24 @@ pbdkdf2(Config) when is_list(Config) -> pbes1() -> [{doc,"Tests encode/decode EncryptedPrivateKeyInfo encrypted with different ciphers using PBES1"}]. pbes1(Config) when is_list(Config) -> - decode_encode_key_file("pbes1_des_cbc_md5_enc_key.pem", "password", "DES-CBC", Config). + case lists:member(des_cbc, crypto:supports(ciphers)) + andalso lists:member(md5, crypto:supports(hashs)) + of + true -> + decode_encode_key_file("pbes1_des_cbc_md5_enc_key.pem", "password", "DES-CBC", Config); + false -> + {skip, alg_not_supported} + end. pbes2() -> [{doc,"Tests encode/decode EncryptedPrivateKeyInfo encrypted with different ciphers using PBES2"}]. pbes2(Config) when is_list(Config) -> - decode_encode_key_file("pbes2_des_cbc_enc_key.pem", "password", "DES-CBC", Config), + case lists:member(des_cbc, crypto:supports(ciphers)) of + true -> + decode_encode_key_file("pbes2_des_cbc_enc_key.pem", "password", "DES-CBC", Config); + false -> + ok + end, decode_encode_key_file("pbes2_des_ede3_cbc_enc_key.pem", "password", "DES-EDE3-CBC", Config), decode_encode_key_file("pbes2_aes_128_enc_key.pem", "password", "AES-128-CBC", Config), decode_encode_key_file("pbes2_aes_192_enc_key.pem", "password", "AES-192-CBC", Config), -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor