Lines Matching refs:ctx

1169 -    slot = PK11_GetBestSlot(ctx->digestType, NULL);
1170 + slot = xmlSecNssSlotGet(ctx->digestType);
2389 + xmlSecNssKeyWrapCtxPtr ctx ,
2397 + xmlSecAssert2( ctx != NULL , -1 ) ;
2398 + xmlSecAssert2( ctx->cipher != CKM_INVALID_MECHANISM , -1 ) ;
2399 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2400 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2405 + if( ctx->material != NULL ) {
2406 + xmlSecBufferDestroy( ctx->material ) ;
2407 + ctx->material = NULL ;
2410 + if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
2419 + ctx->material = xmlSecBufferCreate( blockSize ) ;
2420 + if( ctx->material == NULL ) {
2430 + if( xmlSecBufferSetData( ctx->material, xmlSecBufferGetData(in), xmlSecBufferGetSize(in) ) < 0 ) {
2456 + xmlSecNssKeyWrapCtxPtr ctx ,
2462 + xmlSecAssert2( ctx != NULL , -1 ) ;
2463 + xmlSecAssert2( ctx->cipher != CKM_INVALID_MECHANISM , -1 ) ;
2464 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2465 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2466 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2472 + if( xmlSecBufferAppend( ctx->material, xmlSecBufferGetData(in), xmlSecBufferGetSize(in) ) < 0 ) {
2668 + xmlSecNssKeyWrapCtxPtr ctx ,
2682 + xmlSecAssert2( ctx != NULL , -1 ) ;
2683 + xmlSecAssert2( ctx->cipher != CKM_INVALID_MECHANISM , -1 ) ;
2684 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2685 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2686 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2689 + in = xmlSecBufferGetData(ctx->material);
2690 + inSize = xmlSecBufferGetSize(ctx->material) ;
2720 + ret = xmlSecNssKWDes3Encrypt( ctx->symkey, ctx->cipher,
2751 + ret = xmlSecNssKWDes3Encrypt( ctx->symkey, ctx->cipher,
2775 + ret = xmlSecNssKWDes3Encrypt( ctx->symkey, ctx->cipher,
2801 + ret = xmlSecNssKWDes3Encrypt( ctx->symkey, ctx->cipher,
2849 + xmlSecNssKeyWrapCtxPtr ctx ,
2864 + xmlSecAssert2( ctx != NULL , -1 ) ;
2865 + xmlSecAssert2( ctx->cipher != CKM_INVALID_MECHANISM , -1 ) ;
2866 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2867 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2868 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2875 + if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
2884 + inSize = xmlSecBufferGetSize( ctx->material ) ;
2895 + if( ( secParam = PK11_ParamFromIV( ctx->cipher , &ivItem ) ) == NULL ) {
2904 + cipherCtx = PK11_CreateContextBySymKey( ctx->cipher , encrypt ? CKA_ENCRYPT : CKA_DECRYPT , ctx->…
2917 + if( PK11_CipherOp( cipherCtx , out, &midSize , outSize , xmlSecBufferGetData( ctx->material ) , i…
2952 + xmlSecNssKeyWrapCtxPtr ctx ,
2962 + xmlSecAssert2( ctx != NULL , -1 ) ;
2963 + xmlSecAssert2( ctx->cipher != CKM_INVALID_MECHANISM , -1 ) ;
2964 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2965 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2966 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2972 + if( xmlSecBufferAppend( ctx->material, xmlSecBufferGetData(in), xmlSecBufferGetSize(in) ) < 0 ) {
2992 + if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
3011 + switch( ctx->cipher ) {
3013 + if( xmlSecNssKeyWrapDesOp(ctx, encrypt, result) < 0 ) {
3025 + if( xmlSecNssKeyWrapAesOp(ctx, encrypt, result) < 0 ) {
3385 ctx = xmlSecNssPKIKeyDataGetCtx(xmlSecKeyGetValue(key));
3386 xmlSecAssert2(ctx != NULL, -1);
3387 - xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == dsaKey, -1);
3388 +/* xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == dsaKey, -1);*/
3457 ctx = xmlSecNssPKIKeyDataGetCtx(data);
3458 xmlSecAssert2(ctx != NULL, -1);
3459 - xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == dsaKey, -1);
3460 +/* xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == dsaKey, -1);*/
3461 if (ctx->privkey != NULL) {
3464 + } else if( ctx->pubkey != NULL ) {
3470 ctx = xmlSecNssPKIKeyDataGetCtx(data);
3471 xmlSecAssert2(ctx != NULL, -1);
3472 - xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == dsaKey, -1);
3473 +/* xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == dsaKey, -1);*/
3475 return(8 * SECKEY_PublicKeyStrength(ctx->pubkey));
3496 ctx = xmlSecNssPKIKeyDataGetCtx(xmlSecKeyGetValue(key));
3497 xmlSecAssert2(ctx != NULL, -1);
3498 - xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == rsaKey, -1);
3499 +/* xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == rsaKey, -1);*/
3514 ctx = xmlSecNssPKIKeyDataGetCtx(data);
3515 xmlSecAssert2(ctx != NULL, -1);
3516 - xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == rsaKey, -1);
3517 +/* xmlSecAssert2(SECKEY_GetPublicKeyType(ctx->pubkey) == rsaKey, -1);*/
3519 return(8 * SECKEY_PublicKeyStrength(ctx->pubkey));
3674 + xmlSecNssSymKeyDataCtxPtr ctx;
3680 + ctx = xmlSecNssSymKeyDataGetCtx(data);
3681 + xmlSecAssert2(ctx != NULL, NULL);
3683 + if( ctx->symkey != NULL ) {
3684 + symkey = PK11_ReferenceSymKey( ctx->symkey ) ;
3694 + xmlSecNssSymKeyDataCtxPtr ctx;
3701 + ctx = xmlSecNssSymKeyDataGetCtx(data);
3702 + xmlSecAssert2(ctx != NULL, -1);
3704 + memset( ctx, 0, sizeof(xmlSecNssSymKeyDataCtx));
3709 + ctx->cipher = CKM_DES3_KEY_GEN;
3715 + ctx->cipher = CKM_AES_KEY_GEN;
3787 + xmlSecNssSymKeyDataCtxPtr ctx;
3794 + ctx = xmlSecNssSymKeyDataGetCtx(data);
3795 + xmlSecAssert(ctx != NULL);
3797 + if( ctx->slot != NULL ) {
3798 + PK11_FreeSlot( ctx->slot ) ;
3799 + ctx->slot = NULL ;
3802 + if( ctx->symkey != NULL ) {
3803 + PK11_FreeSymKey( ctx->symkey ) ;
3804 + ctx->symkey = NULL ;
3807 + ctx->cipher = CKM_INVALID_MECHANISM ;
3819 + xmlSecNssSymKeyDataCtxPtr ctx;
3839 + ctx = xmlSecNssSymKeyDataGetCtx(data);
3840 + xmlSecAssert2(ctx != NULL, -1);
3867 + slot = xmlSecNssSlotGet(ctx->cipher);
3886 + symKey = PK11_ImportSymKey(slot, ctx->cipher, PK11_OriginGenerated, CKA_VALUE, &keyItem, NULL …
4026 + xmlSecNssSymKeyDataCtxPtr ctx;
4047 + ctx = xmlSecNssSymKeyDataGetCtx(data);
4048 + xmlSecAssert2(ctx != NULL, -1);
4051 + slot = xmlSecNssSlotGet(ctx->cipher);
4068 + symKey = PK11_ImportSymKey(slot, ctx->cipher, PK11_OriginGenerated, CKA_VALUE, &keyItem, NULL …
4188 + xmlSecNssSymKeyDataCtxPtr ctx;
4198 + ctx = xmlSecNssSymKeyDataGetCtx(data);
4199 + xmlSecAssert2(ctx != NULL, -1);
4211 + slot = xmlSecNssSlotGet(ctx->cipher);
4231 + symkey = PK11_KeyGen( slot , ctx->cipher , NULL , sizeBits/8 , NULL ) ;
4242 + if( ctx->slot != NULL ) {
4243 + PK11_FreeSlot( ctx->slot ) ;
4244 + ctx->slot = NULL ;
4246 + ctx->slot = slot ;
4248 + if( ctx->symkey != NULL ) {
4249 + PK11_FreeSymKey( ctx->symkey ) ;
4250 + ctx->symkey = NULL ;
4252 + ctx->symkey = symkey ;
4997 + /* todo: flag in ctx remove all existing content */
5481 xmlSecNssX509DataCtxPtr ctx;
5507 keyValue = xmlSecNssX509CertGetKey(ctx->keyCert);