find SuisseID certs; refs #32

This commit is contained in:
Marc Wäckerlin
2011-04-26 07:02:29 +00:00
parent 30b56d01fc
commit dfe4746c99

View File

@@ -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;
}