Lines Matching refs:slot

302 + * Internal NSS key slot data
303 + * @mechanismList: the mechanisms that the slot bound with.
304 + * @slot: the pkcs slot
313 + PK11SlotInfo* slot ;
342 + PK11SlotInfo* slot
348 + PK11SlotInfo* slot
396 + * A PKCS#11 slot repository will be defined internally. From the
397 + * repository, a user can specify a particular slot for a certain crypto
407 + * Initialize NSS pkcs#11 slot repository
414 + * Shutdown and destroy NSS pkcs#11 slot repository
419 + * Get PKCS#11 slot handler
420 + * @type the mechanism that the slot must support.
422 + * Returns a pointer to PKCS#11 slot or NULL if an error occurs.
429 + * Adopt a pkcs#11 slot with a mechanism into the repository
430 + * @slot: the pkcs#11 slot.
434 + * this mechanism only can perform on the @slot.
438 +XMLSEC_CRYPTO_EXPORT int xmlSecNssSlotAdopt( PK11SlotInfo* slot, CK_MECHANISM_TYPE mech ) ;
799 + * @slot: array of pointers to NSS PKCS#11 slot information.
803 + * Create and load NSS crypto slot and certificate database into keys manager
831 + /* Create a key slot */
844 + /* Set slot */
1169 - slot = PK11_GetBestSlot(ctx->digestType, NULL);
1170 + slot = xmlSecNssSlotGet(ctx->digestType);
1171 if(slot == NULL) {
1205 + * NSS key store uses a key list and a slot list as the key repository. NSS slot
1207 + * the key list, the NSS slot list is looked up.
1209 + * Any key in the key list will not save to pkcs11 slot. When a store to called
1211 + * to set a is resident in the key list; While a store to called to set a slot
1212 + * list, which means that the keys in the listed slot can be used for xml sign-
1215 + * Then, a user can adjust slot list to effect the crypto behaviors of xmlSec.
1219 + * user set up a slot list handler to the keys store, he do not need to do any
1220 + * other work atop xmlSec interfaces, his action on the slot list handler, such
1225 + * 0. Create a slot list;( NSS interfaces )
1227 + * 2. Set slot list with the keys store;( xmlSec Interfaces )
1228 + * 3. Add a slot to the slot list;( NSS interfaces )
1230 + * 5. Deleter a slot from the slot list;( NSS interfaces )
1234 + * 8. Destroy the slot list.( NSS Interfaces )
1506 + PK11SlotInfo* slot,
1514 + xmlSecAssert2( slot != NULL , NULL ) ;
1522 + /* Find symmetric key from the slot by name */
1523 + symKey = PK11_ListFixedKeysInSlot( slot , ( char* )name , NULL ) ;
1552 + /* Find asymmetric key from the slot by name */
1553 + pubKeyList = PK11_ListPublicKeysInSlot( slot , ( char* )name ) ;
1584 + /* Find asymmetric key from the slot by name */
1585 + priKeyList = PK11_ListPrivKeysInSlot( slot , ( char* )name , NULL ) ;
1699 + PK11SlotInfo* slot = NULL ;
1704 + slot = xmlSecNssKeySlotGetSlot( keySlot ) ;
1705 + if( slot == NULL ) {
1708 + key = xmlSecNssKeysStoreFindKeyFromSlot( slot, name, keyInfoCtx ) ;
3353 - slot = PK11_GetBestSlot(CKM_DSA, NULL);
3354 + slot = xmlSecNssSlotGet(CKM_DSA);
3355 if(slot == NULL) {
3367 if (slot != NULL) {
3368 PK11_FreeSlot(slot);
3412 - slot = PK11_GetBestSlot(CKM_DSA_KEY_PAIR_GEN, NULL);
3413 + slot = xmlSecNssSlotGet(CKM_DSA_KEY_PAIR_GEN);
3414 PK11_Authenticate(slot, PR_TRUE, NULL /* default pwd callback */);
3415 privkey = PK11_GenerateKeyPair(slot, CKM_DSA_KEY_PAIR_GEN, pqgParams,
3481 - slot = PK11_GetBestSlot(CKM_RSA_PKCS, NULL);
3482 + slot = xmlSecNssSlotGet(CKM_RSA_PKCS);
3483 if(slot == NULL) {
3507 - slot = PK11_GetBestSlot(CKM_RSA_PKCS_KEY_PAIR_GEN, NULL);
3508 + slot = xmlSecNssSlotGet(CKM_RSA_PKCS_KEY_PAIR_GEN);
3509 PK11_Authenticate(slot, PR_TRUE, NULL /* default pwd callback */);
3510 privkey = PK11_GenerateKeyPair(slot, CKM_RSA_PKCS_KEY_PAIR_GEN, &params,
3545 + * Symmetic (binary) keys - a wrapper over slot information and PK11SymKey
3553 + PK11SlotInfo* slot ; /* the key resident slot */
3595 + if( context->slot != NULL ) {
3596 + PK11_FreeSlot( context->slot ) ;
3597 + context->slot = NULL ;
3599 + context->slot = PK11_GetSlotFromKey( symkey ) ;
3752 + if( ctxSrc->slot != NULL ) {
3753 + if( ctxDst->slot != NULL && ctxDst->slot != ctxSrc->slot ) {
3754 + PK11_FreeSlot( ctxDst->slot ) ;
3755 + ctxDst->slot = NULL ;
3758 + if( ctxDst->slot == NULL && ctxSrc->slot != NULL )
3759 + ctxDst->slot = PK11_ReferenceSlot( ctxSrc->slot ) ;
3761 + if( ctxDst->slot != NULL ) {
3762 + PK11_FreeSlot( ctxDst->slot ) ;
3763 + ctxDst->slot = NULL ;
3797 + if( ctx->slot != NULL ) {
3798 + PK11_FreeSlot( ctx->slot ) ;
3799 + ctx->slot = NULL ;
3815 + PK11SlotInfo* slot ;
3866 + /* Get slot */
3867 + slot = xmlSecNssSlotGet(ctx->cipher);
3868 + if( slot == NULL ) {
3885 + /* Import the raw key into slot temporalily and get the key handler*/
3886 + symKey = PK11_ImportSymKey(slot, ctx->cipher, PK11_OriginGenerated, CKA_VALUE, &keyItem, NULL …
3894 + PK11_FreeSlot( slot ) ;
3899 + PK11_FreeSlot( slot ) ;
4024 + PK11SlotInfo* slot ;
4050 + /* Get slot */
4051 + slot = xmlSecNssSlotGet(ctx->cipher);
4052 + if( slot == NULL ) {
4067 + /* Import the raw key into slot temporalily and get the key handler*/
4068 + symKey = PK11_ImportSymKey(slot, ctx->cipher, PK11_OriginGenerated, CKA_VALUE, &keyItem, NULL …
4075 + PK11_FreeSlot( slot ) ;
4089 + PK11_FreeSlot( slot ) ;
4095 + PK11_FreeSlot( slot ) ;
4187 + PK11SlotInfo* slot ;
4210 + /* Get slot */
4211 + slot = xmlSecNssSlotGet(ctx->cipher);
4212 + if( slot == NULL ) {
4221 + if( PK11_Authenticate( slot, PR_FALSE , NULL ) != SECSuccess ) {
4227 + PK11_FreeSlot( slot ) ;
4231 + symkey = PK11_KeyGen( slot , ctx->cipher , NULL , sizeBits/8 , NULL ) ;
4238 + PK11_FreeSlot( slot ) ;
4242 + if( ctx->slot != NULL ) {
4243 + PK11_FreeSlot( ctx->slot ) ;
4244 + ctx->slot = NULL ;
4246 + ctx->slot = slot ;
4381 + * particular crypto device, a subclass of xmlSecList is used to store slot and
4384 + * In the list, a slot is bound with a mechanism. If the mechanism is available,
4385 + * this mechanism only can perform on the slot; otherwise, it can perform on
4386 + * every eligibl slot in the list.
4388 + * When try to find a slot for a particular mechanism, the slot bound with
4497 + PK11SlotInfo* slot
4501 + if( slot != NULL && keySlot->slot != slot ) {
4502 + if( keySlot->slot != NULL )
4503 + PK11_FreeSlot( keySlot->slot ) ;
4510 + keySlot->slot = PK11_ReferenceSlot( slot ) ;
4519 + PK11SlotInfo* slot
4522 + xmlSecAssert2( keySlot->slot == NULL , -1 ) ;
4525 + if( slot != NULL ) {
4526 + keySlot->slot = PK11_ReferenceSlot( slot ) ;
4543 + if( keySlot->slot != NULL ) {
4544 + PK11_FreeSlot( keySlot->slot ) ;
4545 + keySlot->slot = NULL ;
4555 + return keySlot->slot ;
4590 + if( keySlot->slot != NULL && newKeySlot->slot != keySlot->slot ) {
4591 + if( newKeySlot->slot != NULL )
4592 + PK11_FreeSlot( newKeySlot->slot ) ;
4594 + newKeySlot->slot = PK11_ReferenceSlot( keySlot->slot ) ;
4657 + if( keySlot->slot != NULL )
4658 + PK11_FreeSlot( keySlot->slot ) ;
4671 + xmlSecAssert2( keySlot->slot != NULL , 0 ) ;
4688 + xmlSecAssert2( keySlot->slot != NULL , 0 ) ;
4691 + if( PK11_DoesMechanism( keySlot->slot , type ) == PR_TRUE ) {
4737 + * Global PKCS#11 crypto token repository -- Key slot list
4745 + PK11SlotInfo* slot = NULL ;
4752 + slot = PK11_GetBestSlot( type , NULL ) ;
4757 + * Firstly, checking whether the mechanism is bound with a special slot.
4758 + * If no bound slot, we try to find the first eligible slot in the list.
4763 + slot = xmlSecNssKeySlotGetSlot( keySlot ) ;
4766 + slot = xmlSecNssKeySlotGetSlot( keySlot ) ;
4773 + if( slot != NULL )
4774 + slot = PK11_ReferenceSlot( slot ) ;
4777 + if( slot != NULL && PK11_NeedLogin( slot ) ) {
4778 + if( PK11_Authenticate( slot , PR_TRUE , NULL ) != SECSuccess ) {
4784 + PK11_FreeSlot( slot ) ;
4789 + return slot ;
4826 + PK11SlotInfo* slot,
4835 + xmlSecAssert2( slot != NULL, -1 ) ;
4840 + * Firstly, checking whether the slot is in the repository already.
4845 + /* If find the slot in the list */
4846 + if( keySlot != NULL && xmlSecNssKeySlotGetSlot( keySlot ) == slot ) {
4847 + /* If mechnism type is valid, bind the slot with the mechanism */
4863 + /* If the slot do not in the list, add a new item to the list */
4876 + /* Initialize the keySlot with a slot */
4877 + if( xmlSecNssKeySlotInitialize( keySlot, slot ) < 0 ) {
4887 + /* If mechnism type is valid, bind the slot with the mechanism */
5487 + PK11SlotInfo* slot ;
5518 + slot = cert->slot ;
5520 + if( ( priKey = PK11_FindPrivateKeyFromCert( slot , cert , NULL ) ) == NULL ) {