diff options
Diffstat (limited to 'xmlsecurity/tools/standalone')
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/certmngr.cxx | 8 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/decrypter.cxx | 20 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/encrypter.cxx | 20 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/helper.cxx | 8 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/helper.hxx | 8 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/signer.cxx | 32 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/verifier.cxx | 36 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/certmngr.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/decrypter.cxx | 18 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/encrypter.cxx | 24 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/helper.cxx | 6 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/helper.hxx | 6 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/signer.cxx | 38 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/verifier.cxx | 42 |
14 files changed, 134 insertions, 134 deletions
diff --git a/xmlsecurity/tools/standalone/csfit/certmngr.cxx b/xmlsecurity/tools/standalone/csfit/certmngr.cxx index 5c6d78c89d9a..b5763e6079e1 100644 --- a/xmlsecurity/tools/standalone/csfit/certmngr.cxx +++ b/xmlsecurity/tools/standalone/csfit/certmngr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -71,8 +71,8 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - CERTCertDBHandle* certHandle ; - PK11SlotInfo* slot ; + CERTCertDBHandle* certHandle ; + PK11SlotInfo* slot ; if( argc != 3 ) { fprintf( stderr, "Usage: %s < CertDir > <rdb file>\n\n" , argv[0] ) ; @@ -148,7 +148,7 @@ int SAL_CALL main( int argc, char **argv ) fprintf( stdout, "\tCertificate Serial Number[%s]\n", OUStringToOString( bigIntegerToNumericString( xPersonalCerts[i]->getSerialNumber() ), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; fprintf( stdout, "\tCertificate Subject[%s]\n", OUStringToOString( xPersonalCerts[i]->getSubjectName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - //build the certificate path + //build the certificate path xCertPath = pSecEnv->buildCertificatePath( xPersonalCerts[i] ) ; //Print the certificate path. fprintf( stdout, "\tCertificate Path\n" ) ; diff --git a/xmlsecurity/tools/standalone/csfit/decrypter.cxx b/xmlsecurity/tools/standalone/csfit/decrypter.cxx index b1177efe58d1..b196e2625ca0 100644 --- a/xmlsecurity/tools/standalone/csfit/decrypter.cxx +++ b/xmlsecurity/tools/standalone/csfit/decrypter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,7 +38,7 @@ #include "libxslt/xslt.h" #endif - + #include "securityenvironment_nssimpl.hxx" #include "xmlelementwrapper_xmlsecimpl.hxx" @@ -82,12 +82,12 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - CERTCertDBHandle* certHandle = NULL ; - PK11SlotInfo* slot = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; + CERTCertDBHandle* certHandle = NULL ; + PK11SlotInfo* slot = NULL ; + xmlDocPtr doc = NULL ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + FILE* dstFile = NULL ; if( argc != 5 ) { @@ -102,7 +102,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT @@ -264,7 +264,7 @@ done: /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); diff --git a/xmlsecurity/tools/standalone/csfit/encrypter.cxx b/xmlsecurity/tools/standalone/csfit/encrypter.cxx index ce6e4c15ccdf..34e2dafa0d09 100644 --- a/xmlsecurity/tools/standalone/csfit/encrypter.cxx +++ b/xmlsecurity/tools/standalone/csfit/encrypter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -79,13 +79,13 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - CERTCertDBHandle* certHandle ; - PK11SlotInfo* slot = NULL ; - PK11SymKey* symKey = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; + CERTCertDBHandle* certHandle ; + PK11SlotInfo* slot = NULL ; + PK11SymKey* symKey = NULL ; + xmlDocPtr doc = NULL ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + FILE* dstFile = NULL ; if( argc != 7 ) { fprintf( stderr, "Usage: %s < CertDir > <file_url of template> <file_url of result> <target element name> <target element namespace> <rdb file>\n\n" , argv[0] ) ; @@ -99,7 +99,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT //Initialize NSPR and NSS @@ -301,7 +301,7 @@ done: /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx index fb2b6b0933c5..62f44cf9dff1 100644 --- a/xmlsecurity/tools/standalone/csfit/helper.cxx +++ b/xmlsecurity/tools/standalone/csfit/helper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ Reference< XInputStream > createStreamFromFile( const OUString sFile ) if( pcFile != NULL ) { FILE *f = fopen( pcFile , "rb" ); Reference< XInputStream > r; - + if( f ) { fseek( f , 0 , SEEK_END ); int nLength = ftell( f ); @@ -58,7 +58,7 @@ Reference< XInputStream > createStreamFromFile( const OUString sFile ) fread( seqIn.getArray() , nLength , 1 , f ); r = Reference< XInputStream > ( new OInputStream( seqIn ) ); - fclose( f ); + fclose( f ); } return r; } else { @@ -103,7 +103,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "No rdb URI specified" ) ; if( sUnoUrl.equalsAscii( "local" ) ) { - Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); + Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); OSL_ENSURE( xSimpleRegistry.is() , "serviceManager - " "Cannot create simple registry" ) ; diff --git a/xmlsecurity/tools/standalone/csfit/helper.hxx b/xmlsecurity/tools/standalone/csfit/helper.hxx index 108ebf73358a..79e8b48f895f 100644 --- a/xmlsecurity/tools/standalone/csfit/helper.hxx +++ b/xmlsecurity/tools/standalone/csfit/helper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -88,7 +88,7 @@ class OInputStream : public WeakImplHelper1 < XInputStream > { public: OInputStream( const Sequence< sal_Int8 >&seq ) : m_seq( seq ), nPos( 0 ) {} - + virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData , sal_Int32 nBytesToRead @@ -199,7 +199,7 @@ class OUriBinding : public WeakImplHelper1 < ::com::sun::star::xml::crypto::XUri virtual void SAL_CALL setUriBinding( const ::rtl::OUString& aUri , - const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aInputStream + const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aInputStream ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { m_vUris.push_back( aUri ) ; m_vStreams.push_back( aInputStream ) ; @@ -215,7 +215,7 @@ class OUriBinding : public WeakImplHelper1 < ::com::sun::star::xml::crypto::XUri break; } } - + return xInputStream; } diff --git a/xmlsecurity/tools/standalone/csfit/signer.cxx b/xmlsecurity/tools/standalone/csfit/signer.cxx index 40e6a64a2b78..4e3a2cf37991 100644 --- a/xmlsecurity/tools/standalone/csfit/signer.cxx +++ b/xmlsecurity/tools/standalone/csfit/signer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -77,18 +77,18 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - CERTCertDBHandle* certHandle ; - PK11SlotInfo* slot ; - xmlDocPtr doc ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri ; - Reference< XUriBinding > xUriBinding ; - FILE* dstFile ; + CERTCertDBHandle* certHandle ; + PK11SlotInfo* slot ; + xmlDocPtr doc ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + xmlAttrPtr idAttr ; + xmlChar* idValue ; + xmlAttrPtr uriAttr ; + xmlChar* uriValue ; + OUString* uri ; + Reference< XUriBinding > xUriBinding ; + FILE* dstFile ; if( argc != 5 ) { fprintf( stderr, "Usage: %s < CertDir > <file_url of template> <file_url of result> <rdb file>\n\n" , argv[0] ) ; @@ -109,7 +109,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT @@ -202,7 +202,7 @@ int SAL_CALL main( int argc, char **argv ) if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; + // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; } @@ -360,7 +360,7 @@ done: /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); diff --git a/xmlsecurity/tools/standalone/csfit/verifier.cxx b/xmlsecurity/tools/standalone/csfit/verifier.cxx index a109b63931fe..ca97fcdca9cf 100644 --- a/xmlsecurity/tools/standalone/csfit/verifier.cxx +++ b/xmlsecurity/tools/standalone/csfit/verifier.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,17 +80,17 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - CERTCertDBHandle* certHandle = NULL ; - PK11SlotInfo* slot = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri = NULL ; - Reference< XUriBinding > xUriBinding ; + CERTCertDBHandle* certHandle = NULL ; + PK11SlotInfo* slot = NULL ; + xmlDocPtr doc = NULL ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + xmlAttrPtr idAttr ; + xmlChar* idValue ; + xmlAttrPtr uriAttr ; + xmlChar* uriValue ; + OUString* uri = NULL ; + Reference< XUriBinding > xUriBinding ; if( argc != 4 ) { fprintf( stderr, "Usage: %s < CertDir > <file_url> <rdb file>\n" , argv[0] ) ; @@ -104,7 +104,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT @@ -138,7 +138,7 @@ int SAL_CALL main( int argc, char **argv ) if( tarNode == NULL ) { tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", NULL ) ; } - + //Find the "id" attrbute in the element if( tarNode != NULL ) { if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"id" ) ) != NULL ) { @@ -149,7 +149,7 @@ int SAL_CALL main( int argc, char **argv ) idAttr = NULL ; } } - + //Add ID to DOM if( idAttr != NULL ) { idValue = xmlNodeListGetString( tarNode->doc, idAttr->children, 1 ) ; @@ -157,7 +157,7 @@ int SAL_CALL main( int argc, char **argv ) fprintf( stderr , "### the ID value is NULL!\n" ) ; goto done ; } - + if( xmlAddID( NULL, doc, idValue, idAttr ) == NULL ) { fprintf( stderr , "### Can not add the ID value!\n" ) ; goto done ; @@ -188,7 +188,7 @@ int SAL_CALL main( int argc, char **argv ) if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; + // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; } @@ -332,7 +332,7 @@ done : /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); diff --git a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx index 2856967cbd26..c9fa5261a00e 100644 --- a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx @@ -113,7 +113,7 @@ int SAL_CALL main( int argc, char **argv ) fprintf( stdout, "\tCertificate Serial Number[%s]\n", OUStringToOString( bigIntegerToNumericString( xPersonalCerts[i]->getSerialNumber() ), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; fprintf( stdout, "\tCertificate Subject[%s]\n", OUStringToOString( xPersonalCerts[i]->getSubjectName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - //build the certificate path + //build the certificate path xCertPath = pSecEnv->buildCertificatePath( xPersonalCerts[i] ) ; //Print the certificate path. fprintf( stdout, "\tCertificate Path\n" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx index 1b0015c6d92e..a36f6a30b628 100644 --- a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx @@ -12,7 +12,7 @@ #include "libxslt/xslt.h" #endif - + #include "securityenvironment_mscryptimpl.hxx" #include "xmlelementwrapper_xmlsecimpl.hxx" @@ -56,12 +56,12 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - CERTCertDBHandle* certHandle = NULL ; - PK11SlotInfo* slot = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; + CERTCertDBHandle* certHandle = NULL ; + PK11SlotInfo* slot = NULL ; + xmlDocPtr doc = NULL ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + FILE* dstFile = NULL ; if( argc != 5 ) { @@ -76,7 +76,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT @@ -238,7 +238,7 @@ done: /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); diff --git a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx index d580649ed0e6..3bf6831459a5 100644 --- a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx @@ -45,16 +45,16 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - const char* n_pCertStore ; - HCERTSTORE n_hStoreHandle ; + const char* n_pCertStore ; + HCERTSTORE n_hStoreHandle ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; + xmlDocPtr doc = NULL ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + FILE* dstFile = NULL ; - HCRYPTPROV hCryptProv = NULL ; - HCRYPTKEY symKey = NULL ; + HCRYPTPROV hCryptProv = NULL ; + HCRYPTKEY symKey = NULL ; if( argc != 6 && argc != 7 ) { fprintf( stderr, "Usage: %s <file_url of template> <file_url of result> <target element name> <target element namespace> <rdb file>\n\n" , argv[0] ) ; @@ -69,7 +69,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT //Initialize the crypto engine @@ -258,8 +258,8 @@ int SAL_CALL main( int argc, char **argv ) OSL_ENSURE( xTemplate.is() , "Encryptor - " "Cannot encrypt the xml document" ) ; - - + + com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus = xTemplate->getStatus(); if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED) { @@ -300,7 +300,7 @@ done: /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx index 631ae1c397b7..e4c497558514 100644 --- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/helper.cxx @@ -16,7 +16,7 @@ Reference< XInputStream > createStreamFromFile( const OUString sFile ) if( pcFile != NULL ) { FILE *f = fopen( pcFile , "rb" ); Reference< XInputStream > r; - + if( f ) { fseek( f , 0 , SEEK_END ); int nLength = ftell( f ); @@ -26,7 +26,7 @@ Reference< XInputStream > createStreamFromFile( const OUString sFile ) fread( seqIn.getArray() , nLength , 1 , f ); r = Reference< XInputStream > ( new OInputStream( seqIn ) ); - fclose( f ); + fclose( f ); } return r; } else { @@ -71,7 +71,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "No rdb URI specified" ) ; if( sUnoUrl.equalsAscii( "local" ) ) { - Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); + Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); OSL_ENSURE( xSimpleRegistry.is() , "serviceManager - " "Cannot create simple registry" ) ; diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.hxx b/xmlsecurity/tools/standalone/mscsfit/helper.hxx index 928c9415e997..fa782b387707 100644 --- a/xmlsecurity/tools/standalone/mscsfit/helper.hxx +++ b/xmlsecurity/tools/standalone/mscsfit/helper.hxx @@ -57,7 +57,7 @@ class OInputStream : public WeakImplHelper1 < XInputStream > { public: OInputStream( const Sequence< sal_Int8 >&seq ) : m_seq( seq ), nPos( 0 ) {} - + virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData , sal_Int32 nBytesToRead @@ -168,7 +168,7 @@ class OUriBinding : public WeakImplHelper1 < ::com::sun::star::xml::crypto::XUri virtual void SAL_CALL setUriBinding( const ::rtl::OUString& aUri , - const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aInputStream + const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aInputStream ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { m_vUris.push_back( aUri ) ; m_vStreams.push_back( aInputStream ) ; @@ -184,7 +184,7 @@ class OUriBinding : public WeakImplHelper1 < ::com::sun::star::xml::crypto::XUri break; } } - + return xInputStream; } diff --git a/xmlsecurity/tools/standalone/mscsfit/signer.cxx b/xmlsecurity/tools/standalone/mscsfit/signer.cxx index ffa88577444a..84fa6aa93ce2 100644 --- a/xmlsecurity/tools/standalone/mscsfit/signer.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/signer.cxx @@ -43,19 +43,19 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - const char* n_pCertStore ; - HCERTSTORE n_hStoreHandle ; - - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri = NULL ; - Reference< XUriBinding > xUriBinding ; - FILE* dstFile = NULL ; + const char* n_pCertStore ; + HCERTSTORE n_hStoreHandle ; + + xmlDocPtr doc = NULL ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + xmlAttrPtr idAttr ; + xmlChar* idValue ; + xmlAttrPtr uriAttr ; + xmlChar* uriValue ; + OUString* uri = NULL ; + Reference< XUriBinding > xUriBinding ; + FILE* dstFile = NULL ; if( argc !=4 && argc != 5 ) { fprintf( stderr, "Usage: %s <file_url of template> <file_url of result> <rdb file>\n" , argv[0] ) ; @@ -72,7 +72,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT //Initialize the crypto engine @@ -159,7 +159,7 @@ int SAL_CALL main( int argc, char **argv ) if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; + // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; } @@ -289,10 +289,10 @@ int SAL_CALL main( int argc, char **argv ) xTemplate = xSigner->generate( xTemplate , xSecEnv ) ; OSL_ENSURE( xTemplate.is() , "Signer - " - "Cannot generate the xml signature" ) ; - + "Cannot generate the xml signature" ) ; + SecurityOperationStatus m_nStatus = xTemplate->getStatus(); - + if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED) { fprintf( stdout, "Operation succeeds.\n") ; @@ -332,7 +332,7 @@ done: /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); diff --git a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx index c66233eebdf6..d7eac01a6e2c 100644 --- a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx @@ -46,19 +46,19 @@ using namespace ::com::sun::star::xml::crypto ; int SAL_CALL main( int argc, char **argv ) { - const char* n_pCertStore ; - HCERTSTORE n_hStoreHandle ; - - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri = NULL ; - Reference< XUriBinding > xUriBinding ; - FILE* dstFile = NULL ; + const char* n_pCertStore ; + HCERTSTORE n_hStoreHandle ; + + xmlDocPtr doc = NULL ; + xmlNodePtr tplNode ; + xmlNodePtr tarNode ; + xmlAttrPtr idAttr ; + xmlChar* idValue ; + xmlAttrPtr uriAttr ; + xmlChar* uriValue ; + OUString* uri = NULL ; + Reference< XUriBinding > xUriBinding ; + FILE* dstFile = NULL ; if( argc !=3 && argc != 4 ) { fprintf( stderr, "Usage: %s <file_url> <rdb file>\n" , argv[0] ) ; @@ -75,7 +75,7 @@ int SAL_CALL main( int argc, char **argv ) xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT //Initialize the crypto engine @@ -111,7 +111,7 @@ int SAL_CALL main( int argc, char **argv ) if( tarNode == NULL ) { tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", NULL ) ; } - + //Find the "id" attrbute in the element if( tarNode != NULL ) { if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"id" ) ) != NULL ) { @@ -122,7 +122,7 @@ int SAL_CALL main( int argc, char **argv ) idAttr = NULL ; } } - + //Add ID to DOM if( idAttr != NULL ) { idValue = xmlNodeListGetString( tarNode->doc, idAttr->children, 1 ) ; @@ -130,7 +130,7 @@ int SAL_CALL main( int argc, char **argv ) fprintf( stderr , "### the ID value is NULL!\n" ) ; goto done ; } - + if( xmlAddID( NULL, doc, idValue, idAttr ) == NULL ) { fprintf( stderr , "### Can not add the ID value!\n" ) ; goto done ; @@ -161,7 +161,7 @@ int SAL_CALL main( int argc, char **argv ) if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; + // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; } @@ -288,9 +288,9 @@ int SAL_CALL main( int argc, char **argv ) //perform validation xTemplate = xSigner->validate( xTemplate , xSecCtx ) ; - + com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus = xTemplate->getStatus(); - + if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED) { fprintf( stdout, "Operation succeeds.\n") ; @@ -318,7 +318,7 @@ done : /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); |