summaryrefslogtreecommitdiff
path: root/libxmlsec
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-04-04 06:46:02 +0000
committerRüdiger Timm <rt@openoffice.org>2005-04-04 06:46:02 +0000
commita647885c2c26d9fcccf288a0d000d4b2f218b991 (patch)
treed0718b7e6886cacc89e206e58dc80a0ad7bb7e7d /libxmlsec
parent04b953581c58374daaf7af358557641982dc3c2f (diff)
INTEGRATION: CWS gccfour (1.2.6); FILE MERGED
2005/03/20 19:44:28 cmc 1.2.6.1: #i44502# move definition of static functions before use so compiler knows their signature before they are used
Diffstat (limited to 'libxmlsec')
-rw-r--r--libxmlsec/xmlsec1-1.2.6.patch210
1 files changed, 105 insertions, 105 deletions
diff --git a/libxmlsec/xmlsec1-1.2.6.patch b/libxmlsec/xmlsec1-1.2.6.patch
index 959b9f1ac5fe..b0b5c1016511 100644
--- a/libxmlsec/xmlsec1-1.2.6.patch
+++ b/libxmlsec/xmlsec1-1.2.6.patch
@@ -7850,111 +7850,6 @@
! return(0);
! }
!
-! /**
-! * Block cipher transform final
-! */
-! static int
-! xmlSecNssKeyWrapCtxFinal(
-! xmlSecNssKeyWrapCtxPtr ctx ,
-! xmlSecBufferPtr in ,
-! xmlSecBufferPtr out ,
-! int encrypt ,
-! xmlSecTransformCtxPtr transformCtx
-! ) {
-! PK11SymKey* targetKey ;
-! xmlSecSize blockSize ;
-! xmlSecBufferPtr result ;
-!
-! xmlSecAssert2( ctx != NULL , -1 ) ;
-! xmlSecAssert2( ctx->cipher != CKM_INVALID_MECHANISM , -1 ) ;
-! xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
-! xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
-! xmlSecAssert2( ctx->material != NULL , -1 ) ;
-! xmlSecAssert2( in != NULL , -1 ) ;
-! xmlSecAssert2( out != NULL , -1 ) ;
-! xmlSecAssert2( transformCtx != NULL , -1 ) ;
-!
-! /* read raw key material and append into context */
-! if( xmlSecBufferAppend( ctx->material, xmlSecBufferGetData(in), xmlSecBufferGetSize(in) ) < 0 ) {
-! xmlSecError( XMLSEC_ERRORS_HERE ,
-! NULL ,
-! "xmlSecBufferAppend" ,
-! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
-! XMLSEC_ERRORS_NO_MESSAGE ) ;
-! return(-1);
-! }
-!
-! if( xmlSecBufferRemoveHead( in , xmlSecBufferGetSize(in) ) < 0 ) {
-! xmlSecError( XMLSEC_ERRORS_HERE ,
-! NULL ,
-! "xmlSecBufferRemoveHead" ,
-! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
-! XMLSEC_ERRORS_NO_MESSAGE ) ;
-! return(-1);
-! }
-!
-! /* Now we get all of the key materail */
-! /* from now on we will wrap or unwrap the key */
-! if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
-! xmlSecError( XMLSEC_ERRORS_HERE ,
-! NULL ,
-! "PK11_GetBlockSize" ,
-! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
-! XMLSEC_ERRORS_NO_MESSAGE ) ;
-! return(-1);
-! }
-!
-! result = xmlSecBufferCreate( blockSize ) ;
-! if( result == NULL ) {
-! xmlSecError( XMLSEC_ERRORS_HERE ,
-! NULL ,
-! "xmlSecBufferCreate" ,
-! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
-! XMLSEC_ERRORS_NO_MESSAGE ) ;
-! return(-1);
-! }
-!
-! switch( ctx->cipher ) {
-! case CKM_DES3_CBC :
-! if( xmlSecNssKeyWrapDesOp(ctx, encrypt, result) < 0 ) {
-! xmlSecError( XMLSEC_ERRORS_HERE ,
-! NULL ,
-! "xmlSecNssKeyWrapDesOp" ,
-! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
-! XMLSEC_ERRORS_NO_MESSAGE ) ;
-! xmlSecBufferDestroy(result);
-! return(-1);
-! }
-! break ;
-! // case CKM_NETSCAPE_AES_KEY_WRAP :
-! case CKM_AES_CBC :
-! if( xmlSecNssKeyWrapAesOp(ctx, encrypt, result) < 0 ) {
-! xmlSecError( XMLSEC_ERRORS_HERE ,
-! NULL ,
-! "xmlSecNssKeyWrapAesOp" ,
-! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
-! XMLSEC_ERRORS_NO_MESSAGE ) ;
-! xmlSecBufferDestroy(result);
-! return(-1);
-! }
-! break ;
-! }
-!
-! /* Write output */
-! if( xmlSecBufferAppend( out, xmlSecBufferGetData(result), xmlSecBufferGetSize(result) ) < 0 ) {
-! xmlSecError( XMLSEC_ERRORS_HERE ,
-! NULL ,
-! "xmlSecBufferAppend" ,
-! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
-! XMLSEC_ERRORS_NO_MESSAGE ) ;
-! xmlSecBufferDestroy(result);
-! return(-1);
-! }
-! xmlSecBufferDestroy(result);
-!
-! return(0);
-! }
-!
! static int
! xmlSecNssKWDes3BufferReverse(xmlSecByte *buf, xmlSecSize size) {
! xmlSecSize s;
@@ -8409,6 +8304,111 @@
! return 0 ;
! }
!
+! /**
+! * Block cipher transform final
+! */
+! static int
+! xmlSecNssKeyWrapCtxFinal(
+! xmlSecNssKeyWrapCtxPtr ctx ,
+! xmlSecBufferPtr in ,
+! xmlSecBufferPtr out ,
+! int encrypt ,
+! xmlSecTransformCtxPtr transformCtx
+! ) {
+! PK11SymKey* targetKey ;
+! xmlSecSize blockSize ;
+! xmlSecBufferPtr result ;
+!
+! xmlSecAssert2( ctx != NULL , -1 ) ;
+! xmlSecAssert2( ctx->cipher != CKM_INVALID_MECHANISM , -1 ) ;
+! xmlSecAssert2( ctx->symkey != NULL , -1 ) ;
+! xmlSecAssert2( ctx->keyId != NULL , -1 ) ;
+! xmlSecAssert2( ctx->material != NULL , -1 ) ;
+! xmlSecAssert2( in != NULL , -1 ) ;
+! xmlSecAssert2( out != NULL , -1 ) ;
+! xmlSecAssert2( transformCtx != NULL , -1 ) ;
+!
+! /* read raw key material and append into context */
+! if( xmlSecBufferAppend( ctx->material, xmlSecBufferGetData(in), xmlSecBufferGetSize(in) ) < 0 ) {
+! xmlSecError( XMLSEC_ERRORS_HERE ,
+! NULL ,
+! "xmlSecBufferAppend" ,
+! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
+! XMLSEC_ERRORS_NO_MESSAGE ) ;
+! return(-1);
+! }
+!
+! if( xmlSecBufferRemoveHead( in , xmlSecBufferGetSize(in) ) < 0 ) {
+! xmlSecError( XMLSEC_ERRORS_HERE ,
+! NULL ,
+! "xmlSecBufferRemoveHead" ,
+! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
+! XMLSEC_ERRORS_NO_MESSAGE ) ;
+! return(-1);
+! }
+!
+! /* Now we get all of the key materail */
+! /* from now on we will wrap or unwrap the key */
+! if( ( blockSize = PK11_GetBlockSize( ctx->cipher , NULL ) ) < 0 ) {
+! xmlSecError( XMLSEC_ERRORS_HERE ,
+! NULL ,
+! "PK11_GetBlockSize" ,
+! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
+! XMLSEC_ERRORS_NO_MESSAGE ) ;
+! return(-1);
+! }
+!
+! result = xmlSecBufferCreate( blockSize ) ;
+! if( result == NULL ) {
+! xmlSecError( XMLSEC_ERRORS_HERE ,
+! NULL ,
+! "xmlSecBufferCreate" ,
+! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
+! XMLSEC_ERRORS_NO_MESSAGE ) ;
+! return(-1);
+! }
+!
+! switch( ctx->cipher ) {
+! case CKM_DES3_CBC :
+! if( xmlSecNssKeyWrapDesOp(ctx, encrypt, result) < 0 ) {
+! xmlSecError( XMLSEC_ERRORS_HERE ,
+! NULL ,
+! "xmlSecNssKeyWrapDesOp" ,
+! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
+! XMLSEC_ERRORS_NO_MESSAGE ) ;
+! xmlSecBufferDestroy(result);
+! return(-1);
+! }
+! break ;
+! // case CKM_NETSCAPE_AES_KEY_WRAP :
+! case CKM_AES_CBC :
+! if( xmlSecNssKeyWrapAesOp(ctx, encrypt, result) < 0 ) {
+! xmlSecError( XMLSEC_ERRORS_HERE ,
+! NULL ,
+! "xmlSecNssKeyWrapAesOp" ,
+! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
+! XMLSEC_ERRORS_NO_MESSAGE ) ;
+! xmlSecBufferDestroy(result);
+! return(-1);
+! }
+! break ;
+! }
+!
+! /* Write output */
+! if( xmlSecBufferAppend( out, xmlSecBufferGetData(result), xmlSecBufferGetSize(result) ) < 0 ) {
+! xmlSecError( XMLSEC_ERRORS_HERE ,
+! NULL ,
+! "xmlSecBufferAppend" ,
+! XMLSEC_ERRORS_R_CRYPTO_FAILED ,
+! XMLSEC_ERRORS_NO_MESSAGE ) ;
+! xmlSecBufferDestroy(result);
+! return(-1);
+! }
+! xmlSecBufferDestroy(result);
+!
+! return(0);
+! }
+!
! static int
! xmlSecNssKeyWrapExecute(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx) {
! xmlSecNssKeyWrapCtxPtr context = NULL ;