find SuisseID certs; refs #32

master
Marc Wäckerlin 13 years ago
parent 30b56d01fc
commit dfe4746c99
  1. 7
      swisssurfer/src/smartcardauth.hxx

@ -49,7 +49,8 @@ class CryptokiEngine: public openssl::Engine {
(QByteArray(data.data(), data.size()),
QSsl::Der));
} else {
if (label.value.find("auth")==0) {
if (label.value.find("auth")==0 ||
label.value.find("Authentication"<std::string::npos)) {
std::string data(cert->attribute(CKA_VALUE).value);
QSslCertificate c(QByteArray(data.data(), data.size()),
QSsl::Der);
@ -221,9 +222,11 @@ class SmartCardAuth: public QObject {
}
static int clientCert(SSL* ssl, X509 **x509, EVP_PKEY **pkey) {
qDebug()<<__PRETTY_FUNCTION__;
qDebug()<<"*** A "<<__PRETTY_FUNCTION__;
*x509 = e()->cert().lowLevelCopy();
qDebug()<<"*** B "<<__PRETTY_FUNCTION__;
*pkey = e()->privkey(0, 0, 0);
qDebug()<<"*** C "<<__PRETTY_FUNCTION__;
return 1;
}

Loading…
Cancel
Save