better interface to get binary certificates; refs #28

master
Marc Wäckerlin 11 years ago
parent e8c230ce1b
commit dccc24c3b0
  1. 4
      doc/examples/suisse-id-demo.cxx

@ -80,8 +80,8 @@ int main(int argc, char** argv) try {
} else if (choice=="z") { } else if (choice=="z") {
for (suisseid::Certificates::iterator cert(certs.begin()); for (suisseid::Certificates::iterator cert(certs.begin());
cert!=certs.end(); ++cert) { cert!=certs.end(); ++cert) {
QByteArray der(QByteArray(cert->data(), cert->size())); QSslCertificate c(QByteArray(cert->data(), cert->size()),
QSslCertificate c(der, QSsl::Der); QSsl::Der);
std::cout<<"Certificate info: CN=" std::cout<<"Certificate info: CN="
<<QString(c.subjectInfo(QSslCertificate::CommonName) <<QString(c.subjectInfo(QSslCertificate::CommonName)
.toUtf8()).toStdString() .toUtf8()).toStdString()

Loading…
Cancel
Save