From 0c91a4dbbf6616a2d160aa5ed0aeeafd94713b89 Mon Sep 17 00:00:00 2001 From: Paul Adelsbach Date: Wed, 24 Dec 2025 13:45:08 -0800 Subject: [PATCH] Fix const issue with x509 test code --- test/test_pkcs7_x509.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_pkcs7_x509.c b/test/test_pkcs7_x509.c index 82fcb93e..d1eaa9c8 100644 --- a/test/test_pkcs7_x509.c +++ b/test/test_pkcs7_x509.c @@ -197,7 +197,7 @@ int test_pkcs7_x509_sign_verify(void* data) return 0; /* Success */ } -static int test_x509_name(X509_NAME *name) { +static int test_x509_name(const X509_NAME *name) { int count = X509_NAME_entry_count(name); PRINT_MSG("X509_NAME has %d entries", count); if (count < 0) { @@ -224,9 +224,9 @@ static int test_x509_name(X509_NAME *name) { return 0; } -static int test_x509_algor(X509 *cert) { +static int test_x509_algor(const X509 *cert) { X509_ALGOR *alg = NULL; - X509_PUBKEY *pubkey = X509_get_X509_PUBKEY(cert); + const X509_PUBKEY *pubkey = X509_get_X509_PUBKEY(cert); if (!pubkey) { PRINT_MSG("No public key found"); return -1; @@ -263,7 +263,7 @@ int test_x509_cert(void* data) { if (err == 0) { PRINT_MSG("Subject:"); - X509_NAME *subject = X509_get_subject_name(cert); + const X509_NAME *subject = X509_get_subject_name(cert); err = test_x509_name(subject); if (err) { PRINT_MSG("Failed to test subject name");