Lines Matching refs:NULL
14 NULL =
105 $(NULL)
117 $(NULL)
312 + CK_MECHANISM_TYPE_PTR mechanismList ; /* mech. array, NULL ternimated */
422 + * Returns a pointer to PKCS#11 slot or NULL if an error occurs.
478 + * Returns keys manager pointer on success or NULL otherwise.
485 + xmlSecKeyDataStorePtr certStore = NULL ;
486 + xmlSecKeysMngrPtr keyMngr = NULL ;
487 + xmlSecKeyStorePtr keyStore = NULL ;
490 + if( keyStore == NULL ) {
492 + NULL ,
496 + return NULL ;
502 + if( keyStore != NULL ) {
507 + if( keyMngr == NULL ) {
509 + NULL ,
515 + return NULL ;
531 + return NULL ;
539 + NULL ,
545 + return NULL ;
597 + xmlSecAssert2( mngr != NULL, -1 ) ;
598 + xmlSecAssert2( keyStore != NULL, -1 ) ;
601 + if( x509Store == NULL ) {
603 + NULL ,
629 + xmlSecAssert2( mngr != NULL, -1 ) ;
630 + xmlSecAssert2( trustedStore != NULL, -1 ) ;
633 + if( x509Store == NULL ) {
635 + NULL ,
661 + xmlSecAssert2( mngr != NULL, -1 ) ;
662 + xmlSecAssert2( untrustedStore != NULL, -1 ) ;
665 + if( x509Store == NULL ) {
667 + NULL ,
695 $(NULL)
724 $(NULL) $(am__append_1)
805 + * Returns keys manager pointer on success or NULL otherwise.
813 + xmlSecKeyDataStorePtr certStore = NULL ;
814 + xmlSecKeysMngrPtr keyMngr = NULL ;
815 + xmlSecKeyStorePtr keyStore = NULL ;
818 + if( keyStore == NULL ) {
820 + NULL ,
824 + return NULL ;
833 + if( keySlot == NULL ) {
841 + return NULL ;
854 + return NULL ;
867 + return NULL ;
872 + if( keyMngr == NULL ) {
874 + NULL ,
880 + return NULL ;
896 + return NULL ;
904 + NULL ,
910 + return NULL ;
921 + if( certStore == NULL ) {
929 + return NULL ;
940 + return NULL ;
961 + xmlSecAssert2( mngr != NULL , -1 ) ;
962 + xmlSecAssert2( symKey != NULL , -1 ) ;
965 + if( keyStore == NULL ) {
967 + NULL ,
976 + if( data == NULL ) {
978 + NULL ,
986 + if( key == NULL ) {
988 + NULL ,
998 + NULL ,
1008 + NULL ,
1028 + xmlSecAssert2( mngr != NULL , -1 ) ;
1029 + xmlSecAssert2( pubKey != NULL , -1 ) ;
1032 + if( keyStore == NULL ) {
1034 + NULL ,
1042 + data = xmlSecNssPKIAdoptKey( NULL, pubKey ) ;
1043 + if( data == NULL ) {
1045 + NULL ,
1053 + if( key == NULL ) {
1055 + NULL ,
1065 + NULL ,
1075 + NULL ,
1095 + xmlSecAssert2( mngr != NULL , -1 ) ;
1096 + xmlSecAssert2( priKey != NULL , -1 ) ;
1099 + if( keyStore == NULL ) {
1101 + NULL ,
1109 + data = xmlSecNssPKIAdoptKey( priKey, NULL ) ;
1110 + if( data == NULL ) {
1112 + NULL ,
1120 + if( key == NULL ) {
1122 + NULL ,
1132 + NULL ,
1142 + NULL ,
1169 - slot = PK11_GetBestSlot(ctx->digestType, NULL);
1171 if(slot == NULL) {
1289 - (xmlSecKeyStorePtr*)NULL)
1306 + xmlSecNssKeysStoreCtxPtr context = NULL ;
1311 + if( context == NULL ) {
1320 + if( context->slotList == NULL ) {
1321 + if( ( context->slotList = xmlSecPtrListCreate( xmlSecNssKeySlotListId ) ) == NULL )…
1360 - NULL, /* void* reserved0; */
1361 - NULL, /* void* reserved1; */
1367 + xmlSecNssKeysStoreCtxPtr context = NULL ;
1373 + if( context == NULL ) {
1382 + if( context->keyList == NULL ) {
1383 + if( ( context->keyList = xmlSecPtrListCreate( xmlSecKeyPtrListId ) ) == NULL ) {
1434 + xmlSecNssKeysStoreCtxPtr context = NULL ;
1440 + if( context == NULL ) {
1449 + context->keyList = NULL ;
1450 + context->slotList = NULL ;
1473 - xmlSecAssert2((key != NULL), -1);
1478 + xmlSecNssKeysStoreCtxPtr context = NULL ;
1484 + if( context == NULL ) {
1493 + if( context->keyList != NULL ) {
1495 + context->keyList = NULL ;
1498 + if( context->slotList != NULL ) {
1500 + context->slotList = NULL ;
1510 + xmlSecKeyPtr key = NULL ;
1511 + xmlSecKeyDataPtr data = NULL ;
1514 + xmlSecAssert2( slot != NULL , NULL ) ;
1515 + xmlSecAssert2( name != NULL , NULL ) ;
1516 + xmlSecAssert2( keyInfoCtx != NULL , NULL ) ;
1523 + symKey = PK11_ListFixedKeysInSlot( slot , ( char* )name , NULL ) ;
1524 + for( curKey = symKey ; curKey != NULL ; curKey = PK11_GetNextSymKey( curKey ) ) {
1535 + if( data == NULL ) {
1542 + for( curKey = symKey ; curKey != NULL ; ) {
1554 + pubKey = NULL ;
1570 + if( pubKey != NULL ) {
1571 + data = xmlSecNssPKIAdoptKey( NULL, pubKey ) ;
1572 + if( data == NULL ) {
1580 + SECKEYPrivateKeyList* priKeyList = NULL ;
1581 + SECKEYPrivateKey* priKey = NULL ;
1585 + priKeyList = PK11_ListPrivKeysInSlot( slot , ( char* )name , NULL ) ;
1586 + priKey = NULL ;
1602 + if( priKey != NULL ) {
1603 + data = xmlSecNssPKIAdoptKey( priKey, NULL ) ;
1604 + if( data == NULL ) {
1614 + if( data != NULL ) {
1615 + if( ( key = xmlSecKeyCreate() ) == NULL ) {
1617 + NULL ,
1623 + return NULL ;
1628 + NULL ,
1635 + return NULL ;
1640 - xmlSecAssert2(((ss != NULL) && (*ss != NULL) &&
1654 + * Returns the pointer to a key or NULL if key is not found or an error occurs.
1662 + xmlSecNssKeysStoreCtxPtr context = NULL ;
1663 + xmlSecKeyPtr key = NULL ;
1664 + xmlSecNssKeySlotPtr keySlot = NULL ;
1668 + xmlSecAssert2( xmlSecKeyStoreCheckId( store , xmlSecNssKeysStoreId ) , NULL ) ;
1669 + xmlSecAssert2( xmlSecKeyStoreCheckSize( store , xmlSecNssKeysStoreSize ) , NULL ) ;
1670 + xmlSecAssert2( keyInfoCtx != NULL , NULL ) ;
1673 + if( context == NULL ) {
1679 + return NULL ;
1685 + if( context->keyList != NULL ) {
1689 + if( key != NULL && xmlSecKeyMatch( key , name , &( keyInfoCtx->keyReq ) ) ) {
1698 + if( context->slotList != NULL ) {
1699 + PK11SlotInfo* slot = NULL ;
1705 + if( slot == NULL ) {
1709 + if( key == NULL ) {
1723 + if( key == NULL ) {
1729 + return NULL ;
1738 + return NULL ;
1748 + NULL ,
1749 + NULL
1790 - xmlSecAssert2((filename != NULL), -1);
1793 - xmlSecAssert2(((ss != NULL) && (*ss != NULL) &&
1803 + xmlSecAssert2(filename != NULL, -1);
1807 + xmlSecAssert2( context != NULL, -1 );
1810 - xmlSecAssert2((*ss == NULL), -1);
1812 + xmlSecAssert2( list != NULL, -1 );
1816 - if(*ss == NULL) {
1820 + if(doc == NULL) {
1841 - xmlSecAssert((ss != NULL) && (*ss != NULL));
1850 - xmlSecKeyPtr key = NULL;
1851 - xmlSecKeyPtr retval = NULL;
1852 - xmlSecKeyReqPtr keyReq = NULL;
1853 - CERTCertificate *cert = NULL;
1854 - SECKEYPublicKey *pubkey = NULL;
1855 - SECKEYPrivateKey *privkey = NULL;
1856 - xmlSecKeyDataPtr data = NULL;
1857 - xmlSecKeyDataPtr x509Data = NULL;
1860 - xmlSecAssert2(xmlSecKeyStoreCheckId(store, xmlSecNssKeysStoreId), NULL);
1861 - xmlSecAssert2(keyInfoCtx != NULL, NULL);
1864 - xmlSecAssert2(((ss != NULL) && (*ss != NULL)), NULL);
1867 - if (key != NULL) {
1874 - if (name == NULL) {
1878 + xmlSecAssert2(idsList != NULL, -1);
1889 - if (cert == NULL) {
1896 + xmlSecAssert2(key != NULL, -1);
1900 - if (pubkey == NULL) {
1902 + if(cur == NULL) {
1904 - NULL,
1920 - privkey = PK11_FindKeyByAnyCert(cert, NULL);
1921 - if (privkey == NULL) {
1923 + if(xmlSecKeyGetName(key) != NULL) {
1924 + if(xmlSecAddChild(cur, xmlSecNodeKeyName, xmlSecDSigNs) == NULL) {
1926 - NULL,
1942 - if(data == NULL) {
1944 - NULL,
1950 - privkey = NULL;
1951 - pubkey = NULL;
1954 - if (key == NULL) {
1956 - NULL,
1960 - return (NULL);
1964 - if(x509Data == NULL) {
1966 - NULL,
1978 + if(dataId->dataNodeName == NULL) {
1983 + if(data == NULL) {
1990 - NULL,
1998 - if (cert == NULL) {
2000 - NULL,
2006 + if(xmlSecAddChild(cur, dataId->dataNodeName, dataId->dataNodeNs) == NULL) {
2019 + ret = xmlSecKeyInfoCtxInitialize(&keyInfoCtx, NULL);
2022 - NULL,
2034 - cert = NULL;
2039 - NULL,
2046 - data = NULL;
2057 - NULL,
2066 - x509Data = NULL;
2074 - key = NULL;
2079 - if (cert != NULL) {
2082 - if (pubkey != NULL) {
2085 - if (privkey != NULL) {
2088 - if (data != NULL) {
2091 - if (x509Data != NULL) {
2094 - if (key != NULL) {
2247 + xmlSecAssert2( context != NULL , -1 ) ;
2278 + NULL ,
2284 + context->symkey = NULL ;
2285 + context->material = NULL ;
2298 + xmlSecAssert( context != NULL ) ;
2300 + if( context->symkey != NULL ) {
2302 + context->symkey = NULL ;
2305 + if( context->material != NULL ) {
2307 + context->material = NULL ;
2320 + xmlSecAssert2(keyReq != NULL, -1);
2323 + xmlSecAssert2( context != NULL , -1 ) ;
2340 + xmlSecNssKeyWrapCtxPtr context = NULL ;
2341 + xmlSecKeyDataPtr keyData = NULL ;
2342 + PK11SymKey* symkey = NULL ;
2347 + xmlSecAssert2(key != NULL, -1);
2350 + if( context == NULL || context->keyId == NULL || context->symkey != NULL ) {
2361 + if( keyData == NULL ) {
2370 + if( ( symkey = xmlSecNssSymKeyDataGetKey( keyData ) ) == NULL ) {
2397 + xmlSecAssert2( ctx != NULL , -1 ) ;
2399 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2400 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2401 + xmlSecAssert2( in != NULL , -1 ) ;
2402 + xmlSecAssert2( out != NULL , -1 ) ;
2403 + xmlSecAssert2( transformCtx != NULL , -1 ) ;
2405 + if( ctx->material != NULL ) {
2407 + ctx->material = NULL ;
2410 + if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
2412 + NULL ,
2420 + if( ctx->material == NULL ) {
2422 + NULL ,
2432 + NULL ,
2441 + NULL ,
2462 + xmlSecAssert2( ctx != NULL , -1 ) ;
2464 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2465 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2466 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2467 + xmlSecAssert2( in != NULL , -1 ) ;
2468 + xmlSecAssert2( out != NULL , -1 ) ;
2469 + xmlSecAssert2( transformCtx != NULL , -1 ) ;
2474 + NULL ,
2483 + NULL ,
2499 + xmlSecAssert2(buf != NULL, -1);
2515 + PK11Context *context = NULL;
2517 + xmlSecByte *digest = NULL;
2520 + xmlSecAssert2(in != NULL, NULL);
2521 + xmlSecAssert2(out != NULL, NULL);
2522 + xmlSecAssert2(outSize >= SHA1_LENGTH, NULL);
2526 + if (context == NULL) {
2528 + NULL,
2538 + NULL,
2548 + NULL,
2558 + NULL,
2564 + xmlSecAssert2(len == SHA1_LENGTH, NULL);
2569 + if (context != NULL) {
2587 + PK11Context* EncContext = NULL;
2589 + SECItem* secParam = NULL ;
2596 + xmlSecAssert2( symKey != NULL , -1 ) ;
2597 + xmlSecAssert2(iv != NULL, -1);
2599 + xmlSecAssert2(in != NULL, -1);
2601 + xmlSecAssert2(out != NULL, -1);
2609 + if (secParam == NULL) {
2611 + NULL,
2621 + if (EncContext == NULL) {
2623 + NULL,
2635 + NULL,
2646 + NULL,
2682 + xmlSecAssert2( ctx != NULL , -1 ) ;
2684 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2685 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2686 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2687 + xmlSecAssert2( result != NULL , -1 ) ;
2695 + if(xmlSecNssComputeSHA1(in, inSize, sha1, SHA1_LENGTH) == NULL) {
2697 + NULL,
2712 + NULL,
2726 + NULL,
2743 + NULL,
2757 + NULL,
2767 + NULL,
2781 + NULL,
2793 + NULL,
2807 + NULL,
2816 + if(xmlSecNssComputeSHA1(out, s, sha1, SHA1_LENGTH) == NULL) {
2818 + NULL,
2827 + NULL,
2828 + NULL,
2836 + NULL,
2853 + PK11Context* cipherCtx = NULL;
2855 + SECItem* secParam = NULL ;
2864 + xmlSecAssert2( ctx != NULL , -1 ) ;
2866 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2867 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2868 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2869 + xmlSecAssert2( result != NULL , -1 ) ;
2875 + if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
2877 + NULL ,
2887 + NULL ,
2895 + if( ( secParam = PK11_ParamFromIV( ctx->cipher , &ivItem ) ) == NULL ) {
2897 + NULL ,
2905 + if( cipherCtx == NULL ) {
2907 + NULL ,
2919 + NULL ,
2928 + NULL ,
2937 + NULL ,
2962 + xmlSecAssert2( ctx != NULL , -1 ) ;
2964 + xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
2965 + xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
2966 + xmlSecAssert2( ctx->material != NULL , -1 ) ;
2967 + xmlSecAssert2( in != NULL , -1 ) ;
2968 + xmlSecAssert2( out != NULL , -1 ) ;
2969 + xmlSecAssert2( transformCtx != NULL , -1 ) ;
2974 + NULL ,
2983 + NULL ,
2992 + if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
2994 + NULL ,
3002 + if( result == NULL ) {
3004 + NULL ,
3015 + NULL ,
3027 + NULL ,
3040 + NULL ,
3054 + xmlSecNssKeyWrapCtxPtr context = NULL ;
3062 + xmlSecAssert2( transformCtx != NULL , -1 ) ;
3065 + if( context == NULL ) {
3083 + if( context->material == NULL ) {
3095 + if( context->material == NULL && last != 0 ) {
3098 + NULL ,
3104 + if( context->material != NULL ) {
3132 + NULL ,
3140 + NULL ,
3167 + NULL, /* xmlSecTransformNodeReadMethod readNode; */
3168 + NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
3171 + NULL, /* xmlSecTransformValidateMethod validate; */
3175 + NULL, /* xmlSecTransformPushXmlMethod pushXml; */
3176 + NULL, /* xmlSecTransformPopXmlMethod popXml; */
3179 + NULL, /* void* reserved0; */
3180 + NULL, /* void* reserved1; */
3198 + NULL, /* xmlSecTransformNodeReadMethod readNode; */
3199 + NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
3202 + NULL, /* xmlSecTransformValidateMethod validate; */
3206 + NULL, /* xmlSecTransformPushXmlMethod pushXml; */
3207 + NULL, /* xmlSecTransformPopXmlMethod popXml; */
3210 + NULL, /* void* reserved0; */
3211 + NULL, /* void* reserved1; */
3229 + NULL, /* xmlSecTransformNodeReadMethod readNode; */
3230 + NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
3233 + NULL, /* xmlSecTransformValidateMethod validate; */
3237 + NULL, /* xmlSecTransformPushXmlMethod pushXml; */
3238 + NULL, /* xmlSecTransformPopXmlMethod popXml; */
3241 + NULL, /* void* reserved0; */
3242 + NULL, /* void* reserved1; */
3300 + NULL, /* xmlSecTransformNodeReadMethod readNode; */
3301 + NULL, /* xmlSecTransformNodeWriteMethod writeNode; */
3304 + NULL, /* xmlSecTransformValidateMethod validate; */
3308 + NULL, /* xmlSecTransformPushXmlMethod pushXml; */
3309 + NULL, /* xmlSecTransformPopXmlMethod popXml; */
3312 + NULL, /* void* reserved0; */
3313 + NULL, /* void* reserved1; */
3344 + ctxDst->privkey = NULL ;
3345 + ctxDst->pubkey = NULL ;
3346 if (ctxSrc->privkey != NULL) {
3348 if(ctxDst->privkey == NULL) {
3353 - slot = PK11_GetBestSlot(CKM_DSA, NULL);
3355 if(slot == NULL) {
3367 if (slot != NULL) {
3372 if (pubkey != NULL) {
3375 if (data != NULL) {
3386 xmlSecAssert2(ctx != NULL, -1);
3412 - slot = PK11_GetBestSlot(CKM_DSA_KEY_PAIR_GEN, NULL);
3414 PK11_Authenticate(slot, PR_TRUE, NULL /* default pwd callback */);
3416 &pubkey, PR_FALSE, PR_TRUE, NULL);
3432 + privkey = NULL ;
3433 + pubkey = NULL ;
3438 if (pqgVerify != NULL) {
3444 if (pubkey != NULL) {
3447 if (privkey != NULL) {
3458 xmlSecAssert2(ctx != NULL, -1);
3461 if (ctx->privkey != NULL) {
3464 + } else if( ctx->pubkey != NULL ) {
3471 xmlSecAssert2(ctx != NULL, -1);
3481 - slot = PK11_GetBestSlot(CKM_RSA_PKCS, NULL);
3483 if(slot == NULL) {
3497 xmlSecAssert2(ctx != NULL, -1);
3507 - slot = PK11_GetBestSlot(CKM_RSA_PKCS_KEY_PAIR_GEN, NULL);
3509 PK11_Authenticate(slot, PR_TRUE, NULL /* default pwd callback */);
3511 &pubkey, PR_FALSE, PR_TRUE, NULL);
3515 xmlSecAssert2(ctx != NULL, -1);
3584 + xmlSecNssSymKeyDataCtxPtr context = NULL ;
3588 + xmlSecAssert2( symkey != NULL, -1 ) ;
3591 + xmlSecAssert2(context != NULL, -1);
3595 + if( context->slot != NULL ) {
3597 + context->slot = NULL ;
3601 + if( context->symkey != NULL ) {
3603 + context->symkey = NULL ;
3613 + xmlSecKeyDataPtr data = NULL ;
3616 + xmlSecAssert2( symKey != NULL , NULL ) ;
3624 + if( data == NULL ) {
3626 + NULL ,
3630 + return NULL ;
3637 + if( data == NULL ) {
3639 + NULL ,
3643 + return NULL ;
3648 + NULL ,
3649 + NULL ,
3652 + return NULL ;
3657 + NULL ,
3663 + return NULL ;
3677 + xmlSecAssert2(xmlSecNssSymKeyDataCheckId(data), NULL);
3678 + xmlSecAssert2(xmlSecKeyDataCheckSize(data, xmlSecNssSymKeyDataSize), NULL);
3681 + xmlSecAssert2(ctx != NULL, NULL);
3683 + if( ctx->symkey != NULL ) {
3686 + symkey = NULL ;
3702 + xmlSecAssert2(ctx != NULL, -1);
3722 + NULL ,
3745 + xmlSecAssert2(ctxDst != NULL, -1);
3748 + xmlSecAssert2(ctxSrc != NULL, -1);
3752 + if( ctxSrc->slot != NULL ) {
3753 + if( ctxDst->slot != NULL && ctxDst->slot != ctxSrc->slot ) {
3755 + ctxDst->slot = NULL ;
3758 + if( ctxDst->slot == NULL && ctxSrc->slot != NULL )
3761 + if( ctxDst->slot != NULL ) {
3763 + ctxDst->slot = NULL ;
3767 + if( ctxSrc->symkey != NULL ) {
3768 + if( ctxDst->symkey != NULL && ctxDst->symkey != ctxSrc->symkey ) {
3770 + ctxDst->symkey = NULL ;
3773 + if( ctxDst->symkey == NULL && ctxSrc->symkey != NULL )
3776 + if( ctxDst->symkey != NULL ) {
3778 + ctxDst->symkey = NULL ;
3795 + xmlSecAssert(ctx != NULL);
3797 + if( ctx->slot != NULL ) {
3799 + ctx->slot = NULL ;
3802 + if( ctx->symkey != NULL ) {
3804 + ctx->symkey = NULL ;
3824 + xmlSecAssert2(key != NULL, -1);
3825 + xmlSecAssert2(node != NULL, -1);
3826 + xmlSecAssert2(keyInfoCtx != NULL, -1);
3830 + if(data == NULL ) {
3840 + xmlSecAssert2(ctx != NULL, -1);
3843 + if( ( keyBuf = xmlSecBufferCreate( 128 ) ) == NULL ) {
3868 + if( slot == NULL ) {
3886 + symKey = PK11_ImportSymKey(slot, ctx->cipher, PK11_OriginGenerated, CKA_VALUE, &keyItem, NULL …
3887 + if( symKey == NULL ) {
3953 + xmlSecAssert2(key != NULL, -1);
3954 + xmlSecAssert2(node != NULL, -1);
3955 + xmlSecAssert2(keyInfoCtx != NULL, -1);
3959 + if( symKey != NULL ) {
3976 + if(keyItem == NULL) {
3988 + if(keyBuf == NULL) {
4031 + xmlSecAssert2(key != NULL, -1);
4032 + xmlSecAssert2(buf != NULL, -1);
4034 + xmlSecAssert2(keyInfoCtx != NULL, -1);
4038 + if(data == NULL ) {
4048 + xmlSecAssert2(ctx != NULL, -1);
4052 + if( slot == NULL ) {
4068 + symKey = PK11_ImportSymKey(slot, ctx->cipher, PK11_OriginGenerated, CKA_VALUE, &keyItem, NULL …
4069 + if( symKey == NULL ) {
4130 + xmlSecAssert2(key != NULL, -1);
4131 + xmlSecAssert2(buf != NULL, -1);
4133 + xmlSecAssert2(keyInfoCtx != NULL, -1);
4137 + if( symKey != NULL ) {
4153 + if(keyItem == NULL) {
4165 + if( *buf == NULL ) {
4168 + NULL,
4195 - xmlSecAssert2(buffer != NULL, -1);
4199 + xmlSecAssert2(ctx != NULL, -1);
4204 + NULL,
4212 + if( slot == NULL ) {
4221 + if( PK11_Authenticate( slot, PR_FALSE , NULL ) != SECSuccess ) {
4231 + symkey = PK11_KeyGen( slot , ctx->cipher , NULL , sizeBits/8 , NULL ) ;
4232 + if( symkey == NULL ) {
4242 + if( ctx->slot != NULL ) {
4244 + ctx->slot = NULL ;
4248 + if( ctx->symkey != NULL ) {
4250 + ctx->symkey = NULL ;
4260 + xmlSecNssSymKeyDataCtxPtr context = NULL ;
4267 - xmlSecAssert2(buffer != NULL, xmlSecKeyDataTypeUnknown);
4269 + if( context == NULL ) {
4279 + if( context->symkey != NULL ) {
4296 + if( context == NULL ) {
4305 + if( context->symkey != NULL ) {
4407 + xmlSecAssert2( keySlot != NULL , -1 ) ;
4414 + if( keySlot->mechanismList == NULL ) {
4416 + NULL ,
4417 + NULL ,
4437 + xmlSecAssert2( keySlot != NULL , -1 ) ;
4442 + if( newList == NULL ) {
4444 + NULL ,
4445 + NULL ,
4469 + xmlSecAssert2( keySlot != NULL , -1 ) ;
4488 + if( keySlot != NULL )
4491 + return NULL ;
4499 + xmlSecAssert2( keySlot != NULL , -1 ) ;
4501 + if( slot != NULL && keySlot->slot != slot ) {
4502 + if( keySlot->slot != NULL )
4505 + if( keySlot->mechanismList != NULL ) {
4507 + keySlot->mechanismList = NULL ;
4521 + xmlSecAssert2( keySlot != NULL , -1 ) ;
4522 + xmlSecAssert2( keySlot->slot == NULL , -1 ) ;
4523 + xmlSecAssert2( keySlot->mechanismList == NULL , -1 ) ;
4525 + if( slot != NULL ) {
4536 + xmlSecAssert( keySlot != NULL ) ;
4538 + if( keySlot->mechanismList != NULL ) {
4540 + keySlot->mechanismList = NULL ;
4543 + if( keySlot->slot != NULL ) {
4545 + keySlot->slot = NULL ;
4554 + if( keySlot != NULL )
4557 + return NULL ;
4566 + if( keySlot == NULL ) {
4568 + NULL ,
4569 + NULL ,
4572 + return( NULL );
4587 + xmlSecAssert2( newKeySlot != NULL , -1 ) ;
4588 + xmlSecAssert2( keySlot != NULL , -1 ) ;
4590 + if( keySlot->slot != NULL && newKeySlot->slot != keySlot->slot ) {
4591 + if( newKeySlot->slot != NULL )
4602 + if( newKeySlot->mechanismList == NULL ) {
4604 + NULL ,
4605 + NULL ,
4624 + xmlSecAssert2( keySlot != NULL , NULL ) ;
4627 + if( newKeySlot == NULL ) {
4629 + NULL ,
4630 + NULL ,
4633 + return( NULL );
4638 + NULL ,
4639 + NULL ,
4642 + return( NULL );
4652 + xmlSecAssert( keySlot != NULL ) ;
4654 + if( keySlot->mechanismList != NULL )
4657 + if( keySlot->slot != NULL )
4670 + xmlSecAssert2( keySlot != NULL , 0 ) ;
4671 + xmlSecAssert2( keySlot->slot != NULL , 0 ) ;
4687 + xmlSecAssert2( keySlot != NULL , 0 ) ;
4688 + xmlSecAssert2( keySlot->slot != NULL , 0 ) ;
4702 + xmlSecAssert( keySlot != NULL ) ;
4703 + xmlSecAssert( output != NULL ) ;
4739 +static xmlSecPtrListPtr _xmlSecNssKeySlotList = NULL ;
4745 + PK11SlotInfo* slot = NULL ;
4751 + if( _xmlSecNssKeySlotList == NULL ) {
4752 + slot = PK11_GetBestSlot( type , NULL ) ;
4762 + if( keySlot != NULL && xmlSecNssKeySlotBindMech( keySlot, type ) ) {
4773 + if( slot != NULL )
4777 + if( slot != NULL && PK11_NeedLogin( slot ) ) {
4778 + if( PK11_Authenticate( slot , PR_TRUE , NULL ) != SECSuccess ) {
4780 + NULL ,
4781 + NULL ,
4785 + return( NULL );
4796 + if( _xmlSecNssKeySlotList != NULL ) {
4798 + _xmlSecNssKeySlotList = NULL ;
4802 + if( _xmlSecNssKeySlotList == NULL ) {
4804 + NULL ,
4805 + NULL ,
4818 + if( _xmlSecNssKeySlotList != NULL ) {
4820 + _xmlSecNssKeySlotList = NULL ;
4834 + xmlSecAssert2( _xmlSecNssKeySlotList != NULL, -1 ) ;
4835 + xmlSecAssert2( slot != NULL, -1 ) ;
4846 + if( keySlot != NULL && xmlSecNssKeySlotGetSlot( keySlot ) == slot ) {
4851 + NULL ,
4852 + NULL ,
4867 + if( keySlot == NULL ) {
4869 + NULL ,
4870 + NULL ,
4879 + NULL ,
4880 + NULL ,
4891 + NULL ,
4892 + NULL ,
4903 + NULL ,
4904 + NULL ,
4982 xmlSecAssert2(key != NULL, -1);
4983 xmlSecAssert2(node != NULL, -1);
4984 xmlSecAssert2(keyInfoCtx != NULL, -1);
4999 + xmlNodeSetContent(node, NULL);
5004 if(data == NULL) {
5015 + if(buf == NULL) {
5031 + if(cur == NULL) {
5065 + if(crl == NULL) {
5086 + if(buf == NULL) {
5101 - if(crl == NULL) {
5121 + if(cur == NULL) {
5147 - xmlSecAssert2(cert != NULL, -1);
5148 - xmlSecAssert2(node != NULL, -1);
5149 - xmlSecAssert2(keyInfoCtx != NULL, -1);
5153 - if(buf == NULL) {
5155 - NULL,
5163 - if(cur == NULL) {
5165 - NULL,
5189 - if((subject == NULL) || (xmlSecIsEmptyString(subject) == 1)) {
5190 - if(subject != NULL) {
5194 + if(subject == NULL) {
5205 cert = xmlSecNssX509StoreFindCert(x509Store, subject, NULL, NULL, NULL, keyInfoCtx);
5212 - xmlChar* buf = NULL;
5213 - xmlNodePtr cur = NULL;
5215 - xmlSecAssert2(cert != NULL, -1);
5216 - xmlSecAssert2(node != NULL, -1);
5219 - if(buf == NULL) {
5221 - NULL,
5229 - if(cur == NULL) {
5231 - NULL,
5251 - if(cur == NULL) {
5266 + if((cur == NULL) || !xmlSecCheckNodeName(cur, xmlSecNodeX509IssuerName, xmlSecDSigNs)) {
5281 - xmlSecAssert2(cert != NULL, -1);
5282 - xmlSecAssert2(node != NULL, -1);
5286 - if(cur == NULL) {
5288 - NULL,
5297 - if(issuerNameNode == NULL) {
5299 - NULL,
5308 - if(issuerNumberNode == NULL) {
5310 - NULL,
5320 - if(buf == NULL) {
5322 - NULL,
5332 - if(buf == NULL) {
5334 - NULL,
5353 - if((ski == NULL) || (xmlSecIsEmptyString(ski) == 1)) {
5354 - if(ski != NULL) {
5358 + if(ski == NULL) {
5370 cert = xmlSecNssX509StoreFindCert(x509Store, NULL, NULL, NULL, ski, keyInfoCtx);
5377 - xmlChar *buf = NULL;
5378 - xmlNodePtr cur = NULL;
5380 - xmlSecAssert2(cert != NULL, -1);
5381 - xmlSecAssert2(node != NULL, -1);
5384 - if(buf == NULL) {
5386 - NULL,
5394 - if(cur == NULL) {
5396 - NULL,
5414 xmlSecAssert2(keyInfoCtx != NULL, -1);
5417 - if((content == NULL) || (xmlSecIsEmptyString(content) == 1)) {
5418 - if(content != NULL) {
5422 + if(content == NULL){
5439 - xmlChar* buf = NULL;
5440 - xmlNodePtr cur = NULL;
5442 - xmlSecAssert2(crl != NULL, -1);
5443 - xmlSecAssert2(node != NULL, -1);
5444 - xmlSecAssert2(keyInfoCtx != NULL, -1);
5448 - if(buf == NULL) {
5450 - NULL,
5458 - if(cur == NULL) {
5460 - NULL,
5488 + SECKEYPublicKey *pubKey = NULL;
5489 + SECKEYPrivateKey *priKey = NULL;
5492 xmlSecAssert2(key != NULL, -1);
5508 if(keyValue == NULL) {
5520 + if( ( priKey = PK11_FindPrivateKeyFromCert( slot , cert , NULL ) ) == NULL ) {
5531 + if( ( pubKey = CERT_ExtractPublicKey( cert ) ) == NULL ) {
5539 + if( priKey != NULL )
5546 + if( keyValue == NULL ) {
5553 + if( priKey != NULL )
5556 + if( pubKey != NULL )
5571 - xmlChar *res = NULL;
5574 - xmlSecAssert2(nm != NULL, NULL);
5577 - if (str == NULL) {
5579 - NULL,
5583 - return(NULL);
5587 - if(res == NULL) {
5589 - NULL,
5594 - return(NULL);
5602 - xmlChar *res = NULL;
5604 - xmlSecAssert2(num != NULL, NULL);
5614 - xmlChar *res = NULL;
5618 - xmlSecAssert2(cert != NULL, NULL);
5625 - NULL,
5630 - return(NULL);
5634 - if(res == NULL) {
5636 - NULL,
5641 - return(NULL);
5684 CERTCertificate *cert = NULL;
5685 - xmlChar *p = NULL;
5686 CERTName *name = NULL;
5687 SECItem *nameitem = NULL;
5688 PRArenaPool *arena = NULL;
5690 if (subjectName != NULL) {
5692 - if (p == NULL) {
5694 - NULL,
5703 if (arena == NULL) {
5705 NULL,
5715 if (name == NULL) {
5717 NULL,
5726 if((issuerName != NULL) && (issuerSerial != NULL)) {
5730 - if (p == NULL) {
5732 - NULL,
5741 if (arena == NULL) {
5743 NULL,
5753 if (name == NULL) {
5755 NULL,
5771 + NULL,
5785 - if (p != NULL) {
5788 if (arena != NULL) {
5799 - xmlSecByte *retval = NULL;
5800 - xmlSecByte *p = NULL;
5803 - xmlSecAssert2(str != NULL, NULL);
5807 - if(retval == NULL) {
5809 - NULL,
5813 - return(NULL);
5826 - NULL,
5842 - NULL,
5854 - NULL,
5855 - NULL,
5870 - NULL,
5871 - NULL,
5880 - NULL,
5904 - return (NULL);
5913 - xmlSecAssert2(str != NULL, -1);
5914 - xmlSecAssert2(strLen != NULL, -1);
5915 - xmlSecAssert2(res != NULL, -1);
5931 - NULL,
5932 - NULL,
5942 - NULL,
5943 - NULL,
5954 - NULL,
5955 - NULL,
5982 + xmlSecAssert2( integer != NULL, -1 ) ;
5983 + xmlSecAssert2( item != NULL, -1 ) ;
5987 + NULL,
5996 + NULL,
6007 + NULL,
6014 + if( bnInteger == NULL ) {
6016 + NULL,
6025 + if( item->data == NULL ) {
6027 + NULL,