Home
last modified time | relevance | path

Searched refs:S2N_ERR_SAFETY (Results 1 – 25 of 31) sorted by relevance

12

/dports/security/s2n/s2n-tls-1.1.2/tests/unit/
H A Ds2n_safety_macros_test.c32 RESULT_BAIL(S2N_ERR_SAFETY); in RESULT_BAIL_harness()
38 RESULT_ENSURE(is_ok, S2N_ERR_SAFETY); in RESULT_ENSURE_harness()
184 RESULT_ENSURE(is_ok, S2N_ERR_SAFETY); in RESULT_PRECONDITION_harness_check()
196 RESULT_ENSURE(is_ok, S2N_ERR_SAFETY); in RESULT_POSTCONDITION_harness_check()
232 POSIX_BAIL(S2N_ERR_SAFETY); in POSIX_BAIL_harness()
238 POSIX_ENSURE(is_ok, S2N_ERR_SAFETY); in POSIX_ENSURE_harness()
432 PTR_BAIL(S2N_ERR_SAFETY); in PTR_BAIL_harness()
438 PTR_ENSURE(is_ok, S2N_ERR_SAFETY); in PTR_ENSURE_harness()
767 EXPECT_ERROR_WITH_ERRNO(RESULT_GUARD_OSSL_harness(0, S2N_ERR_SAFETY), S2N_ERR_SAFETY); in main()
902 EXPECT_FAILURE_WITH_ERRNO(POSIX_GUARD_OSSL_harness(0, S2N_ERR_SAFETY), S2N_ERR_SAFETY); in main()
[all …]
H A Ds2n_asn1_time_test.c197 …O(s2n_asn1_time_to_nano_since_epoch_ticks(time_str, strlen(time_str), &timestamp), S2N_ERR_SAFETY); in main()
204 …O(s2n_asn1_time_to_nano_since_epoch_ticks(time_str, strlen(time_str), &timestamp), S2N_ERR_SAFETY); in main()
211 …O(s2n_asn1_time_to_nano_since_epoch_ticks(time_str, strlen(time_str), &timestamp), S2N_ERR_SAFETY); in main()
218 …O(s2n_asn1_time_to_nano_since_epoch_ticks(time_str, strlen(time_str), &timestamp), S2N_ERR_SAFETY); in main()
H A Ds2n_stuffer_network_order_test.c224 EXPECT_FAILURE_WITH_ERRNO(s2n_stuffer_write_reservation(&reservation, 0), S2N_ERR_SAFETY); in main()
229 …EXPECT_FAILURE_WITH_ERRNO(s2n_stuffer_write_reservation(&reservation, UINT32_MAX), S2N_ERR_SAFETY); in main()
235 EXPECT_FAILURE_WITH_ERRNO(s2n_stuffer_write_reservation(&reservation, 0), S2N_ERR_SAFETY); in main()
H A Ds2n_certificate_test.c542 …(s2n_cert_get_utf8_string_from_extension_data_length(der_ext_value, 0, &utf8_len), S2N_ERR_SAFETY); in main()
586 … &utf8_str.size), S2N_ERR_SAFETY); in main()
H A Ds2n_tls13_hybrid_shared_secret_test.c596 …_ERRNO(s2n_tls13_compute_pq_hybrid_shared_secret(conn, &calculated_shared_secret), S2N_ERR_SAFETY); in main()
599 …_ERRNO(s2n_tls13_compute_pq_hybrid_shared_secret(conn, &calculated_shared_secret), S2N_ERR_SAFETY); in main()
H A Ds2n_tls_prf_test.c122 EXPECT_FAILURE_WITH_ERRNO(s2n_prf_calculate_master_secret(conn, &pms), S2N_ERR_SAFETY); in main()
H A Ds2n_protocol_preferences_test.c182 EXPECT_ERROR_WITH_ERRNO(s2n_protocol_preferences_read(&input, &result), S2N_ERR_SAFETY); in main()
H A Ds2n_tls13_keys_test.c368 … EXPECT_FAILURE_WITH_ERRNO(s2n_tls13_derive_early_secret(&test_keys, &test_psk), S2N_ERR_SAFETY); in main()
/dports/security/s2n/s2n-tls-1.1.2/utils/
H A Ds2n_safety_macros.h66 …SURE_GTE(a, b) __S2N_ENSURE((a) >= (b), RESULT_BAIL(S2N_ERR_SAFETY))
71 …SURE_LTE(a, b) __S2N_ENSURE((a) <= (b), RESULT_BAIL(S2N_ERR_SAFETY))
76 …NSURE_GT(a, b) __S2N_ENSURE((a) > (b), RESULT_BAIL(S2N_ERR_SAFETY))
81 …NSURE_LT(a, b) __S2N_ENSURE((a) < (b), RESULT_BAIL(S2N_ERR_SAFETY))
86 …SURE_EQ(a, b) __S2N_ENSURE((a) == (b), RESULT_BAIL(S2N_ERR_SAFETY))
91 …SURE_NE(a, b) __S2N_ENSURE((a) != (b), RESULT_BAIL(S2N_ERR_SAFETY))
241 …ENSURE_GT(a, b) __S2N_ENSURE((a) > (b), POSIX_BAIL(S2N_ERR_SAFETY))
246 …ENSURE_LT(a, b) __S2N_ENSURE((a) < (b), POSIX_BAIL(S2N_ERR_SAFETY))
396 …NSURE_GTE(a, b) __S2N_ENSURE((a) >= (b), PTR_BAIL(S2N_ERR_SAFETY))
406 …ENSURE_GT(a, b) __S2N_ENSURE((a) > (b), PTR_BAIL(S2N_ERR_SAFETY))
[all …]
H A Ds2n_blob.c30 RESULT_DEBUG_ENSURE(S2N_IMPLIES(b->data == NULL, b->size == 0), S2N_ERR_SAFETY); in s2n_blob_validate()
31 RESULT_DEBUG_ENSURE(S2N_IMPLIES(b->data == NULL, b->allocated == 0), S2N_ERR_SAFETY); in s2n_blob_validate()
32 RESULT_DEBUG_ENSURE(S2N_IMPLIES(b->growable == 0, b->allocated == 0), S2N_ERR_SAFETY); in s2n_blob_validate()
33 RESULT_DEBUG_ENSURE(S2N_IMPLIES(b->growable != 0, b->size <= b->allocated), S2N_ERR_SAFETY); in s2n_blob_validate()
34 RESULT_DEBUG_ENSURE(S2N_MEM_IS_READABLE(b->data, b->allocated), S2N_ERR_SAFETY); in s2n_blob_validate()
35 RESULT_DEBUG_ENSURE(S2N_MEM_IS_READABLE(b->data, b->size), S2N_ERR_SAFETY); in s2n_blob_validate()
42 POSIX_ENSURE(S2N_MEM_IS_READABLE(data, size), S2N_ERR_SAFETY); in s2n_blob_init()
H A Ds2n_safety.c197 POSIX_ENSURE(alignment != 0, S2N_ERR_SAFETY); in s2n_align_to()
H A Ds2n_array.c31 RESULT_ENSURE(S2N_IMPLIES(array->mem.size, array->mem.growable), S2N_ERR_SAFETY); in s2n_array_validate()
H A Ds2n_asn1_time.c66 #define PARSE_DIGIT(c, d) do { RESULT_ENSURE(isdigit(c), S2N_ERR_SAFETY); d = c - '0'; } while(0)
/dports/security/s2n/s2n-tls-1.1.2/pq-crypto/
H A Ds2n_pq.c253 RESULT_ENSURE_OK(s2n_try_enable_bike_r3_opt_pclmul(), S2N_ERR_SAFETY); in s2n_try_enable_bike_r3_opt_avx2()
262 RESULT_ENSURE_OK(s2n_try_enable_bike_r3_opt_avx2(), S2N_ERR_SAFETY); in s2n_try_enable_bike_r3_opt_avx512()
270 RESULT_ENSURE_OK(s2n_try_enable_bike_r3_opt_avx512(), S2N_ERR_SAFETY); in s2n_try_enable_bike_r3_opt_vpclmul()
298 RESULT_ENSURE_OK(s2n_try_enable_bike_r3_opt_vpclmul(), S2N_ERR_SAFETY); in s2n_bike_r3_x86_64_opt_init()
303 RESULT_ENSURE_OK(s2n_try_enable_sikep434r3_asm(), S2N_ERR_SAFETY); in s2n_pq_init()
304 RESULT_ENSURE_OK(s2n_bike_r3_x86_64_opt_init(), S2N_ERR_SAFETY); in s2n_pq_init()
305 RESULT_ENSURE_OK(s2n_try_enable_kyber512r3_opt_avx2_bmi2(), S2N_ERR_SAFETY); in s2n_pq_init()
/dports/security/s2n/s2n-tls-1.1.2/docs/
H A DSAFETY-MACROS.md48 Ensures `a` is greater than `b`, otherwise the function will `RESULT_BAIL` with a `S2N_ERR_SAFETY` …
53 Ensures `a` is less than `b`, otherwise the function will `RESULT_BAIL` with a `S2N_ERR_SAFETY` err…
58 Ensures `a` is equal to `b`, otherwise the function will `RESULT_BAIL` with a `S2N_ERR_SAFETY` error
68 Ensures `min <= n <= max`, otherwise the function will `RESULT_BAIL` with `S2N_ERR_SAFETY`
73 Ensures `min < n < max`, otherwise the function will `RESULT_BAIL` with `S2N_ERR_SAFETY`
212 Ensures `a` is equal to `b`, otherwise the function will `POSIX_BAIL` with a `S2N_ERR_SAFETY` error
222 Ensures `min <= n <= max`, otherwise the function will `POSIX_BAIL` with `S2N_ERR_SAFETY`
227 Ensures `min < n < max`, otherwise the function will `POSIX_BAIL` with `S2N_ERR_SAFETY`
366 Ensures `a` is equal to `b`, otherwise the function will `PTR_BAIL` with a `S2N_ERR_SAFETY` error
376 Ensures `min <= n <= max`, otherwise the function will `PTR_BAIL` with `S2N_ERR_SAFETY`
[all …]
/dports/security/s2n/s2n-tls-1.1.2/stuffer/
H A Ds2n_stuffer.c34 RESULT_DEBUG_ENSURE(S2N_IMPLIES(stuffer->growable, stuffer->alloced), S2N_ERR_SAFETY); in s2n_stuffer_validate()
37 RESULT_DEBUG_ENSURE(stuffer->high_water_mark <= stuffer->blob.size, S2N_ERR_SAFETY); in s2n_stuffer_validate()
38 RESULT_DEBUG_ENSURE(stuffer->write_cursor <= stuffer->high_water_mark, S2N_ERR_SAFETY); in s2n_stuffer_validate()
39 RESULT_DEBUG_ENSURE(stuffer->read_cursor <= stuffer->write_cursor, S2N_ERR_SAFETY); in s2n_stuffer_validate()
54 RESULT_ENSURE(stuffer_obj.blob.size >= reserve_obj.length, S2N_ERR_SAFETY); in s2n_stuffer_reservation_validate()
57 RESULT_ENSURE(reserve_obj.write_cursor < stuffer_obj.write_cursor, S2N_ERR_SAFETY); in s2n_stuffer_reservation_validate()
60 S2N_ERR_SAFETY in s2n_stuffer_reservation_validate()
310 POSIX_ENSURE(S2N_MEM_IS_READABLE(data, size), S2N_ERR_SAFETY); in s2n_stuffer_write_bytes()
H A Ds2n_stuffer_text.c128 POSIX_ENSURE(min <= max, S2N_ERR_SAFETY); in s2n_stuffer_skip_expected_char()
H A Ds2n_stuffer_network_order.c26 POSIX_ENSURE(length <= sizeof(input), S2N_ERR_SAFETY); in s2n_stuffer_write_network_order()
/dports/security/s2n/s2n-tls-1.1.2/tls/
H A Ds2n_kem.c320 RESULT_ENSURE(kem_params->public_key.size == kem->public_key_length, S2N_ERR_SAFETY); in s2n_kem_generate_keypair()
336 RESULT_ENSURE(kem_params->public_key.size == kem->public_key_length, S2N_ERR_SAFETY); in s2n_kem_encapsulate()
341 RESULT_ENSURE(ciphertext->size == kem->ciphertext_length, S2N_ERR_SAFETY); in s2n_kem_encapsulate()
357 RESULT_ENSURE(kem_params->private_key.size == kem->private_key_length, S2N_ERR_SAFETY); in s2n_kem_decapsulate()
362 RESULT_ENSURE(ciphertext->size == kem->ciphertext_length, S2N_ERR_SAFETY); in s2n_kem_decapsulate()
H A Ds2n_handshake.c355 RESULT_DEBUG_ENSURE(s2n_handshake->handshake_type < 256, S2N_ERR_SAFETY); in s2n_handshake_validate()
356 …G_ENSURE(s2n_handshake->message_number >= 0 && s2n_handshake->message_number < 32, S2N_ERR_SAFETY); in s2n_handshake_validate()
H A Ds2n_client_key_exchange.c202 S2N_ERROR_IF(shared_key != &(conn->kex_params.kem_params.shared_secret), S2N_ERR_SAFETY); in s2n_kem_client_key_recv()
297 S2N_ERROR_IF(shared_key != &(conn->kex_params.kem_params.shared_secret), S2N_ERR_SAFETY); in s2n_kem_client_key_send()
H A Ds2n_server_new_session_ticket.c377 RESULT_ENSURE(session_ticket_len > 0, S2N_ERR_SAFETY); in s2n_tls13_server_nst_recv()
/dports/security/s2n/s2n-tls-1.1.2/tls/extensions/
H A Ds2n_client_psk.c118 RESULT_ENSURE(current_time >= psk->ticket_issue_time, S2N_ERR_SAFETY); in s2n_generate_obfuscated_ticket_age()
125 RESULT_ENSURE(ticket_age_in_millis <= UINT32_MAX, S2N_ERR_SAFETY); in s2n_generate_obfuscated_ticket_age()
/dports/security/s2n/s2n-tls-1.1.2/error/
H A Ds2n_errno.h140 S2N_ERR_SAFETY, enumerator
H A Ds2n_errno.c114 ERR_ENTRY(S2N_ERR_SAFETY, "a safety check failed") \

12