Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-477): [#def1]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c: scope_hint: In function ‘kmip_connection_tls_init’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:382:17: warning[-Wdeprecated-declarations]: ‘SSL_set1_host’ is deprecated: Since OpenSSL 4.0
#  382 |                 if (SSL_set1_host(conn->plain_tls.ssl, hostname) != 1) {
#      |                 ^~
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.h:17: included_from: Included from here.
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:20: included_from: Included from here.
/usr/include/openssl/ssl.h:1928:34: note: declared here
# 1928 | OSSL_DEPRECATEDIN_4_0 __owur int SSL_set1_host(SSL *s, const char *host);
#      |                                  ^~~~~~~~~~~~~
#  380|   		SSL_set_hostflags(conn->plain_tls.ssl,
#  381|   				  X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
#  382|-> 		if (SSL_set1_host(conn->plain_tls.ssl, hostname) != 1) {
#  383|   			kmip_debug(debug, "SSL_set1_host failed");
#  384|   			if (debug)

Error: COMPILER_WARNING (CWE-477): [#def2]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:382:17: warning[-Wdeprecated-declarations]: ‘SSL_set1_host’ is deprecated: Since OpenSSL 4.0
#  380|   		SSL_set_hostflags(conn->plain_tls.ssl,
#  381|   				  X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
#  382|-> 		if (SSL_set1_host(conn->plain_tls.ssl, hostname) != 1) {
#  383|   			kmip_debug(debug, "SSL_set1_host failed");
#  384|   			if (debug)

Error: COMPILER_WARNING (CWE-477): [#def3]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c: scope_hint: In function ‘p11kmip_check_certificate’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1194:5: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1194 |     *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
#      |     ^
/usr/include/openssl/pem.h:23: included_from: Included from here.
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:37: included_from: Included from here.
/usr/include/openssl/x509.h:694:27: note: declared here
#  694 | OSSL_DEPRECATEDIN_4_0 int X509_cmp_current_time(const ASN1_TIME *s);
#      |                           ^~~~~~~~~~~~~~~~~~~~~
# 1192|                                     X509_get_issuer_name(cert)) == 0);
# 1193|   
# 1194|->     *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|                 X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   

Error: COMPILER_WARNING (CWE-477): [#def4]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1194:5: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1192|                                     X509_get_issuer_name(cert)) == 0);
# 1193|   
# 1194|->     *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|                 X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   

Error: COMPILER_WARNING (CWE-477): [#def5]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1195:15: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1195 |               X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
#      |               ^~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/x509.h:694:27: note: declared here
#  694 | OSSL_DEPRECATEDIN_4_0 int X509_cmp_current_time(const ASN1_TIME *s);
#      |                           ^~~~~~~~~~~~~~~~~~~~~
# 1193|   
# 1194|       *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|->               X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   
# 1197|       X509_free(cert);

Error: COMPILER_WARNING (CWE-477): [#def6]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1195:15: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1193|   
# 1194|       *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|->               X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   
# 1197|       X509_free(cert);

Error: COMPILER_WARNING (CWE-704): [#def7]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c: scope_hint: In function ‘p11sak_import_x509_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5929:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5929 |     name = X509_get_subject_name(x509);
#      |          ^
# 5927|   
# 5928|       /* CKA_SUBJECT: DER-encoding of the cert subject name */
# 5929|->     name = X509_get_subject_name(x509);
# 5930|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 5931|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Error: COMPILER_WARNING (CWE-704): [#def8]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5929:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5927|   
# 5928|       /* CKA_SUBJECT: DER-encoding of the cert subject name */
# 5929|->     name = X509_get_subject_name(x509);
# 5930|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 5931|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Error: COMPILER_WARNING (CWE-704): [#def9]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5938:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5938 |     name = X509_get_issuer_name(x509);
#      |          ^
# 5936|   
# 5937|       /* CKA_ISSUER: DER-encoding of the cert issuer name */
# 5938|->     name = X509_get_issuer_name(x509);
# 5939|       if (!X509_NAME_get0_der(name, &issuer_name, &issuer_name_len)) {
# 5940|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's issuer name");

Error: COMPILER_WARNING (CWE-704): [#def10]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5938:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5936|   
# 5937|       /* CKA_ISSUER: DER-encoding of the cert issuer name */
# 5938|->     name = X509_get_issuer_name(x509);
# 5939|       if (!X509_NAME_get0_der(name, &issuer_name, &issuer_name_len)) {
# 5940|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's issuer name");

Error: COMPILER_WARNING (CWE-704): [#def11]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c: scope_hint: In function ‘p11sak_extract_x509_pk’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:6082:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6082 |     name = X509_get_subject_name(x509);
#      |          ^
# 6080|       }
# 6081|   
# 6082|->     name = X509_get_subject_name(x509);
# 6083|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 6084|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Error: COMPILER_WARNING (CWE-704): [#def12]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:6082:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6080|       }
# 6081|   
# 6082|->     name = X509_get_subject_name(x509);
# 6083|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 6084|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-127.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameopencryptoki-3.27.0-3.fc45
diffbase-store-results-to/tmp/tmpseesxvq6/opencryptoki-3.27.0-3.fc45.tar.xz
diffbase-time-created2026-08-03 19:02:10
diffbase-time-finished2026-08-03 19:07:09
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpseesxvq6/opencryptoki-3.27.0-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpseesxvq6/opencryptoki-3.27.0-3.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-127.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameopencryptoki-3.26.0-2.fc44
store-results-to/tmp/tmp9sh5cfme/opencryptoki-3.26.0-2.fc44.tar.xz
time-created2026-08-03 18:56:21
time-finished2026-08-03 19:01:45
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp9sh5cfme/opencryptoki-3.26.0-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp9sh5cfme/opencryptoki-3.26.0-2.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9