Skip to content

Commit

Permalink
Find a cipher that exists on older OpenSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Jul 17, 2023
1 parent 36f5fe9 commit 5529c79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions openssl/src/ssl/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1660,21 +1660,21 @@ fn ssl_cipher_find() {
let ssl = client.ssl();

assert!(
SslCipherRef::find(ssl, &[0x13, 0x01]).is_some(),
SslCipherRef::find(ssl, &[0x00, 0x02]).is_some(),
"valid cipher ID"
);

assert!(SslCipherRef::find(ssl, &[]).is_none(), "empty cipher ID");
assert!(
SslCipherRef::find(ssl, &[0x13]).is_none(),
SslCipherRef::find(ssl, &[0x00]).is_none(),
"too-short cipher ID"
);
assert!(
SslCipherRef::find(ssl, &[0x00, 0x00]).is_none(),
"invalid cipher ID"
SslCipherRef::find(ssl, &[0xff, 0xff]).is_none(),
"invalid cipher ID (reserved for private use)"
);
assert!(
SslCipherRef::find(ssl, &[0x13, 0x01, 0x02]).is_none(),
SslCipherRef::find(ssl, &[0x00, 0x00, 0x00]).is_none(),
"too-long cipher ID"
);
}

0 comments on commit 5529c79

Please sign in to comment.