From 2ce007ab8ff41c1a9dc00927626dd80cd946de28 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 cae983f0ce..a97d2fd125 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);