mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 00:02:37 +00:00
get rid of workarounds for bug 323494.
This commit is contained in:
parent
3b8374aa75
commit
0144e82b78
@ -158,22 +158,6 @@ Java_org_mozilla_jss_pkcs11_PK11KeyPairGenerator_generateRSAKeyPair
|
||||
goto finish;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* HACK to workaround bug #323494
|
||||
* On internal token, must call C_FindObjectsInit before creating
|
||||
* any token objects.
|
||||
*************************************************/
|
||||
if( slot==PK11_GetInternalSlot() || slot==PK11_GetInternalKeySlot() ) {
|
||||
CK_ATTRIBUTE attr;
|
||||
CK_OBJECT_CLASS class = CKO_PRIVATE_KEY;
|
||||
|
||||
attr.type = CKA_CLASS;
|
||||
attr.pValue = &class;
|
||||
attr.ulValueLen = sizeof(class);
|
||||
|
||||
PK11_NumberObjectsFor(slot, &attr, 1);
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* generate the key pair on the token
|
||||
*************************************************/
|
||||
@ -288,22 +272,6 @@ Java_org_mozilla_jss_pkcs11_PK11KeyPairGenerator_generateDSAKeyPair
|
||||
goto finish;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* HACK to workaround bug #323494
|
||||
* On internal token, must call C_FindObjectsInit before creating
|
||||
* any token objects.
|
||||
*************************************************/
|
||||
if( slot==PK11_GetInternalSlot() || slot==PK11_GetInternalKeySlot() ) {
|
||||
CK_ATTRIBUTE attr;
|
||||
CK_OBJECT_CLASS class = CKO_PRIVATE_KEY;
|
||||
|
||||
attr.type = CKA_CLASS;
|
||||
attr.pValue = &class;
|
||||
attr.ulValueLen = sizeof(class);
|
||||
|
||||
PK11_NumberObjectsFor(slot, &attr, 1);
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* generate the key pair on the token
|
||||
*************************************************/
|
||||
|
@ -737,22 +737,6 @@ decodeAndImportEncryptedKey(SECKEYDBKey *dbkey, SECItem *pwitem,
|
||||
}
|
||||
|
||||
|
||||
/**************************************************
|
||||
* HACK to workaround bug #323494
|
||||
* On internal token, must call C_FindObjectsInit before creating
|
||||
* any token objects.
|
||||
*************************************************/
|
||||
if( slot==PK11_GetInternalSlot() || slot==PK11_GetInternalKeySlot() ) {
|
||||
CK_ATTRIBUTE attr;
|
||||
CK_OBJECT_CLASS class = CKO_PRIVATE_KEY;
|
||||
|
||||
attr.type = CKA_CLASS;
|
||||
attr.pValue = &class;
|
||||
attr.ulValueLen = sizeof(class);
|
||||
|
||||
PK11_NumberObjectsFor(slot, &attr, 1);
|
||||
}
|
||||
|
||||
nickname.len = 0;
|
||||
nickname.data = NULL;
|
||||
rv = PK11_ImportEncryptedPrivateKeyInfo(slot, newepki, pwitem, &nickname,
|
||||
@ -893,22 +877,6 @@ decodeAndImportKey(SECItem *dervalue,
|
||||
goto loser;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* HACK to workaround bug #323494
|
||||
* On internal token, must call C_FindObjectsInit before creating
|
||||
* any token objects.
|
||||
*************************************************/
|
||||
if( slot==PK11_GetInternalSlot() || slot==PK11_GetInternalKeySlot() ) {
|
||||
CK_ATTRIBUTE attr;
|
||||
CK_OBJECT_CLASS class = CKO_PRIVATE_KEY;
|
||||
|
||||
attr.type = CKA_CLASS;
|
||||
attr.pValue = &class;
|
||||
attr.ulValueLen = sizeof(class);
|
||||
|
||||
PK11_NumberObjectsFor(slot, &attr, 1);
|
||||
}
|
||||
|
||||
nickname.len = 0;
|
||||
nickname.data = NULL;
|
||||
|
||||
|
@ -1198,22 +1198,6 @@ GenerateKeyPair(JNIEnv *env, unsigned int ktype, PK11SlotInfo *slot, SECKEYPubli
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* HACK to workaround bug #323494
|
||||
* On internal token, must call C_FindObjectsInit before creating
|
||||
* any token objects.
|
||||
*************************************************/
|
||||
if( slot==PK11_GetInternalSlot() || slot==PK11_GetInternalKeySlot() ) {
|
||||
CK_ATTRIBUTE attr;
|
||||
CK_OBJECT_CLASS class = CKO_PRIVATE_KEY;
|
||||
|
||||
attr.type = CKA_CLASS;
|
||||
attr.pValue = &class;
|
||||
attr.ulValueLen = sizeof(class);
|
||||
|
||||
PK11_NumberObjectsFor(slot, &attr, 1);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("key type == %d", ktype);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user