Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
sqauash: address review comments
Signed-off-by: Michael Dawson <midawson@redhat.com>
  • Loading branch information
mhdawson committed Sep 16, 2024
commit a2373be597b2eecc365434a1cdd88a68c80e13d4
12 changes: 6 additions & 6 deletions test/parallel/test-tls-cert-regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ let cert = fixtures.readKey('rsa_cert.crt');
// This test validates that we accept certificates and keys which
// do not end with a newline. If a newline exists at the end
// of the key or cert being used remove it
if (key[key.length - 1] === 0x0A) {
key = key.slice(0, key.length - 1);
}
let i = 0;
while (key[key.length - 1 - i] === 0x0a) i++;
if (i !== 0) key = key.slice(0, key.length - i);

if (cert[cert.length - 1] === 0x0A) {
cert = cert.slice(0, cert.length - 1);
}
i = 0;
while (cert[cert.length - 1 - i] === 0x0a) i++;
if (i !== 0) cert = cert.slice(0, cert.length - i);

function test(cert, key, cb) {
const server = tls.createServer({
Expand Down