summaryrefslogtreecommitdiffstats
path: root/kcert
diff options
context:
space:
mode:
Diffstat (limited to 'kcert')
-rw-r--r--kcert/kcertpart.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/kcert/kcertpart.cc b/kcert/kcertpart.cc
index e704ad339..937e107c9 100644
--- a/kcert/kcertpart.cc
+++ b/kcert/kcertpart.cc
@@ -557,9 +557,6 @@ if (whatType == "application/x-pkcs12") {
return false;
}
-#define sk_free KOSSL::self()->sk_free
-#define sk_num KOSSL::self()->sk_num
-#define sk_value KOSSL::self()->sk_value
STACK_OF(X509_INFO) *sx5i = KOSSL::self()->PEM_X509_INFO_read(fp, NULL, KSSLPemCallback, NULL);
if (!sx5i) {
@@ -569,8 +566,8 @@ if (whatType == "application/x-pkcs12") {
}
_ca_filenameLabel->setText(m_file);
- for (int i = 0; i < sk_X509_INFO_num(sx5i); i++) {
- X509_INFO* x5i = sk_X509_INFO_value(sx5i, i);
+ for (int i = 0; i < KOSSL::self()->OPENSSL_sk_num(sx5i); i++) {
+ X509_INFO* x5i = reinterpret_cast<X509_INFO*>(KOSSL::self()->OPENSSL_sk_value(sx5i, i));
if (x5i->x_pkey && x5i->x509) { // a personal cert (like PKCS12)
KSSLCertificate *xc = KSSLCertificate::fromX509(x5i->x509);
new KX509Item(_sideList, xc);
@@ -584,11 +581,7 @@ if (whatType == "application/x-pkcs12") {
}
}
- sk_X509_INFO_free(sx5i);
-
-#undef sk_free
-#undef sk_num
-#undef sk_value
+ KOSSL::self()->OPENSSL_sk_free(sx5i);
fclose(fp);
return true;