diff options
author | tb <> | 2022-07-07 13:11:45 +0000 |
---|---|---|
committer | tb <> | 2022-07-07 13:11:45 +0000 |
commit | 90c70235c6fe2f498764aa307c81725f3bc9f60c (patch) | |
tree | b00024fb06171b26abcfb312f71d140a5b23e0ed /src | |
parent | ffd5201b790390adaf50eebc7668794d58513a97 (diff) | |
download | openbsd-90c70235c6fe2f498764aa307c81725f3bc9f60c.tar.gz openbsd-90c70235c6fe2f498764aa307c81725f3bc9f60c.tar.bz2 openbsd-90c70235c6fe2f498764aa307c81725f3bc9f60c.zip |
Add some minimal regress coverage for the security level.
From beck
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/unit/cipher_list.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/regress/lib/libssl/unit/cipher_list.c b/src/regress/lib/libssl/unit/cipher_list.c index 9a5d978140..0623dd69eb 100644 --- a/src/regress/lib/libssl/unit/cipher_list.c +++ b/src/regress/lib/libssl/unit/cipher_list.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cipher_list.c,v 1.10 2021/01/09 12:39:22 tb Exp $ */ | 1 | /* $OpenBSD: cipher_list.c,v 1.11 2022/07/07 13:11:45 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015 Doug Hogan <doug@openbsd.org> | 3 | * Copyright (c) 2015 Doug Hogan <doug@openbsd.org> |
4 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
@@ -180,6 +180,7 @@ main(void) | |||
180 | /* Use TLSv1.2 client to get all ciphers. */ | 180 | /* Use TLSv1.2 client to get all ciphers. */ |
181 | CHECK_GOTO((ctx = SSL_CTX_new(TLSv1_2_client_method())) != NULL); | 181 | CHECK_GOTO((ctx = SSL_CTX_new(TLSv1_2_client_method())) != NULL); |
182 | CHECK_GOTO((s = SSL_new(ctx)) != NULL); | 182 | CHECK_GOTO((s = SSL_new(ctx)) != NULL); |
183 | SSL_set_security_level(s, 2); | ||
183 | 184 | ||
184 | if (!ssl_bytes_to_list_alloc(s, &ciphers)) | 185 | if (!ssl_bytes_to_list_alloc(s, &ciphers)) |
185 | goto err; | 186 | goto err; |
@@ -190,6 +191,10 @@ main(void) | |||
190 | if (!ssl_bytes_to_list_invalid(s, &ciphers)) | 191 | if (!ssl_bytes_to_list_invalid(s, &ciphers)) |
191 | goto err; | 192 | goto err; |
192 | 193 | ||
194 | SSL_set_security_level(s, 3); | ||
195 | if (ssl_list_to_bytes_scsv(s, &ciphers)) | ||
196 | goto err; | ||
197 | |||
193 | rv = 0; | 198 | rv = 0; |
194 | 199 | ||
195 | err: | 200 | err: |