Skip to content

Commit 3b8385f

Browse files
committed
fix: skip TLS-only AES-CBC-HMAC ciphers in tests
These ciphers require special ctrl functions and are not intended for use outside TLS. They also depend on hardware (AES-NI) and may not be available on CI emulators. See: https://www.openssl.org/docs/man3.0/man3/EVP_aes_128_cbc_hmac_sha1.html
1 parent 2b81084 commit 3b8385f

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

example/src/tests/cipher/cipher_tests.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,21 @@ test(SUITE, 'buffers', () => {
5050
roundTrip('aes-128-cbc', key16, iv, plaintextBuffer);
5151
});
5252

53+
// AES-CBC-HMAC ciphers are TLS-only and require special ctrl functions.
54+
// They also depend on specific hardware (AES-NI) and may not be available
55+
// on all platforms (e.g., CI emulators). Skip them in tests.
56+
// See: https://www.openssl.org/docs/man3.0/man3/EVP_aes_128_cbc_hmac_sha1.html
57+
const TLS_ONLY_CIPHERS = [
58+
'AES-128-CBC-HMAC-SHA1',
59+
'AES-128-CBC-HMAC-SHA256',
60+
'AES-256-CBC-HMAC-SHA1',
61+
'AES-256-CBC-HMAC-SHA256',
62+
];
63+
5364
// loop through each cipher and test roundtrip
54-
const allCiphers = getCiphers();
65+
const allCiphers = getCiphers().filter(
66+
c => !TLS_ONLY_CIPHERS.includes(c.toUpperCase()),
67+
);
5568
allCiphers.forEach(cipherName => {
5669
test(SUITE, cipherName, () => {
5770
try {

0 commit comments

Comments
 (0)