summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c')
-rw-r--r--src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c b/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
index 6d2c93c98..b4cc7a805 100644
--- a/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
+++ b/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
@@ -401,20 +401,6 @@ static bool find_key(private_pkcs11_private_key_t *this, chunk_t keyid)
};
CK_OBJECT_HANDLE object;
CK_KEY_TYPE type;
-<<<<<<< HEAD
- CK_BBOOL reauth;
- CK_ATTRIBUTE attr[] = {
- {CKA_KEY_TYPE, &type, sizeof(type)},
- {CKA_ALWAYS_AUTHENTICATE, &reauth, sizeof(reauth)},
- {CKA_MODULUS, NULL, 0},
- {CKA_PUBLIC_EXPONENT, NULL, 0},
- };
- enumerator_t *enumerator;
- chunk_t modulus, pubexp;
-
- enumerator = this->lib->create_object_enumerator(this->lib,
- this->session, tmpl, countof(tmpl), attr, countof(attr));
-=======
CK_BBOOL reauth = FALSE;
CK_ATTRIBUTE attr[] = {
{CKA_KEY_TYPE, &type, sizeof(type)},
@@ -433,28 +419,18 @@ static bool find_key(private_pkcs11_private_key_t *this, chunk_t keyid)
}
enumerator = this->lib->create_object_enumerator(this->lib,
this->session, tmpl, countof(tmpl), attr, count);
->>>>>>> upstream/4.5.1
if (enumerator->enumerate(enumerator, &object))
{
switch (type)
{
case CKK_RSA:
-<<<<<<< HEAD
- if (attr[2].ulValueLen == -1 || attr[3].ulValueLen == -1)
-=======
if (attr[1].ulValueLen == -1 || attr[2].ulValueLen == -1)
->>>>>>> upstream/4.5.1
{
DBG1(DBG_CFG, "reading modulus/exponent from PKCS#1 failed");
break;
}
-<<<<<<< HEAD
- modulus = chunk_create(attr[2].pValue, attr[2].ulValueLen);
- pubexp = chunk_create(attr[3].pValue, attr[3].ulValueLen);
-=======
modulus = chunk_create(attr[1].pValue, attr[1].ulValueLen);
pubexp = chunk_create(attr[2].pValue, attr[2].ulValueLen);
->>>>>>> upstream/4.5.1
this->pubkey = lib->creds->create(lib->creds, CRED_PUBLIC_KEY,
KEY_RSA, BUILD_RSA_MODULUS, modulus,
BUILD_RSA_PUB_EXP, pubexp, BUILD_END);