On Tue, Apr 15, 2014 at 07:03:21PM +0300, Aki Tuomi wrote: > On Tue, Apr 15, 2014 at 06:56:37PM +0300, Aki Tuomi wrote: > > On Tue, Apr 15, 2014 at 11:39:42AM +0200, Rickard Bellgrim wrote: > > > On Sat, Apr 12, 2014 at 1:08 PM, Aki Tuomi <[email protected]> wrote: > > > > > > > > > > > I hope someone can tell me what I am doing wrong? > > > > > > > > > > > The issue is not CKA_SIGN, the issue is that you are generating a key with > > > label "test4" but you are searching for an object with the label "test". > > > > > > // Rickard > > > > Thank you for your reply, and well spotted. > > > > Aki > > Unfortunately I still have problem: > > attr[0].type = CKA_CLASS; > unsigned long value2 = CKO_PUBLIC_KEY; > attr[0].pValue = &value2; > attr[0].ulValueLen = sizeof(value2); > attr[1].type = CKA_LABEL; > attr[1].pValue = const_cast<char*>("test4"); > attr[1].ulValueLen = 5; > > module->C_FindObjectsInit(session, attr, 2); > module->C_FindObjects(session, &object, 1, &objects); > module->C_FindObjectsFinal(session); > > std::cout << "Found " << objects << " object(s)" << std::endl; > if (objects == 0) return 0; > > > For the same slot, this gives me 0 objects found. How should I retrieve the > public key from SoftHSM? > > Aki > > > _______________________________________________ > > Opendnssec-user mailing list > > [email protected] > > https://lists.opendnssec.org/mailman/listinfo/opendnssec-user >
Also. I tested that the database ends up in VERY different state when one performs --export --init-token --import than it does with C_GenerateKeyPair() Is there something else one needs to do after C_GenerateKeyPair that I am not currently doing? Aki > _______________________________________________ > Opendnssec-user mailing list > [email protected] > https://lists.opendnssec.org/mailman/listinfo/opendnssec-user
signature.asc
Description: Digital signature
_______________________________________________ Opendnssec-user mailing list [email protected] https://lists.opendnssec.org/mailman/listinfo/opendnssec-user
