From: Aki Tuomi Date: Thu, 13 Jul 2023 06:51:45 +0000 (+0300) Subject: pkcs11signers: Use emplace_back for attributes X-Git-Tag: rec-5.0.0-alpha1~107^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=990102dbf1fc92585086a0d13b8041a00badf494;p=thirdparty%2Fpdns.git pkcs11signers: Use emplace_back for attributes --- diff --git a/pdns/pkcs11signers.cc b/pdns/pkcs11signers.cc index 9269c9e5f8..872bd518a5 100644 --- a/pdns/pkcs11signers.cc +++ b/pdns/pkcs11signers.cc @@ -371,9 +371,8 @@ class Pkcs11Token { auto slot = d_slot->lock(); std::vector attr; std::vector key; - attr.push_back(P11KitAttribute(CKA_CLASS, (unsigned long)CKO_PRIVATE_KEY)); -// attr.push_back(P11KitAttribute(CKA_SIGN, (char)CK_TRUE)); - attr.push_back(P11KitAttribute(CKA_LABEL, d_label)); + attr.emplace_back(CKA_CLASS, (unsigned long)CKO_PRIVATE_KEY); + attr.emplace_back(CKA_LABEL, d_label); FindObjects2(*slot, attr, key, 1); if (key.size() == 0) { g_log<