From 4a90aa2bba6b323317516233adb6f97ce30bb98c Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Tue, 6 Feb 2024 18:26:12 +0100 Subject: [PATCH] Ensure rnp_signature_get_features fails in expected scenarios. --- src/tests/ffi-key-sig.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/ffi-key-sig.cpp b/src/tests/ffi-key-sig.cpp index 4814b3fa17..1176de51fd 100644 --- a/src/tests/ffi-key-sig.cpp +++ b/src/tests/ffi-key-sig.cpp @@ -903,6 +903,8 @@ TEST_F(rnp_tests, test_ffi_sig_validity) assert_rnp_success(rnp_signature_get_expiration(sig, &expires)); assert_int_equal(expires, 86400); uint32_t features = 0; + assert_rnp_failure(rnp_signature_get_features(NULL, &features)); + assert_rnp_failure(rnp_signature_get_features(sig, NULL)); assert_rnp_success(rnp_signature_get_features(sig, &features)); assert_int_equal(features, 0); rnp_signature_handle_destroy(sig);