summaryrefslogtreecommitdiffstats
path: root/tdecert
diff options
context:
space:
mode:
Diffstat (limited to 'tdecert')
-rw-r--r--tdecert/tdecertpart.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/tdecert/tdecertpart.cc b/tdecert/tdecertpart.cc
index c6b163afb..3c937e9d6 100644
--- a/tdecert/tdecertpart.cc
+++ b/tdecert/tdecertpart.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;