Apple Bug morte log; refs #34

master
Marc Wäckerlin 10 years ago
parent e2e95cbc87
commit 98c3fcf07b
  1. 4
      src/suisseid.hxx

@ -274,19 +274,23 @@ namespace suisseid {
}
virtual Certificate certificate(const std::string& keylabel) {
CRYPTOLOG("get certificate for key "<<keylabel);
cryptoki::ObjectList keys // find keys with digsig-label
(session().find(cryptoki::AttributeList()
<<cryptoki::Attribute(CKA_CLASS)
.from<CK_OBJECT_CLASS>(CKO_PUBLIC_KEY)
<<cryptoki::Attribute(CKA_LABEL, keylabel)));
CRYPTOLOG("found "<<keys.size()<<" keys");
for (cryptoki::ObjectList::iterator key(keys.begin());
key!=keys.end(); ++key) {
cryptoki::Attribute id(key->attribute(CKA_ID));
CRYPTOLOG("get certs for key with id "<<id);
cryptoki::ObjectList certs
(session().find(cryptoki::AttributeList()
<<cryptoki::Attribute(CKA_CLASS)
.from<CK_OBJECT_CLASS>(CKO_CERTIFICATE)
<<id));
CRYPTOLOG("found "<<certs.size()<<" certificates");
for (cryptoki::ObjectList::iterator cert(certs.begin());
cert!=certs.end(); ++cert) { // return first matching cert
return Certificate(cert->attribute(CKA_VALUE).value,

Loading…
Cancel
Save