summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/pch/precompiled_xmlsecurity.cxx2
-rw-r--r--xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/biginteger.hxx4
-rw-r--r--xmlsecurity/inc/xmlsecurity/certificatechooser.hxx4
-rw-r--r--xmlsecurity/inc/xmlsecurity/certificateviewer.hxx4
-rw-r--r--xmlsecurity/inc/xmlsecurity/certvalidity.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx4
-rw-r--r--xmlsecurity/inc/xmlsecurity/documentsignaturehelper.hxx3
-rw-r--r--xmlsecurity/inc/xmlsecurity/global.hrc1
-rw-r--r--xmlsecurity/inc/xmlsecurity/macrosecurity.hxx4
-rw-r--r--xmlsecurity/inc/xmlsecurity/sigstruct.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/stbcontrl.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/warnings.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx3
-rw-r--r--xmlsecurity/prj/build.lst2
-rw-r--r--xmlsecurity/source/component/certificatecontainer.cxx8
-rw-r--r--xmlsecurity/source/component/certificatecontainer.hxx6
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx6
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.hxx3
-rw-r--r--xmlsecurity/source/component/registerservices.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx4
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx19
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.src25
-rw-r--r--xmlsecurity/source/dialogs/dialogs.hrc8
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx40
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.src15
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx25
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.src9
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.cxx10
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.hxx3
-rw-r--r--xmlsecurity/source/dialogs/stbcontrl.cxx63
-rw-r--r--xmlsecurity/source/dialogs/warnings.cxx4
-rw-r--r--xmlsecurity/source/framework/buffernode.cxx81
-rw-r--r--xmlsecurity/source/framework/buffernode.hxx5
-rw-r--r--xmlsecurity/source/framework/decryptorimpl.cxx11
-rw-r--r--xmlsecurity/source/framework/decryptorimpl.hxx6
-rw-r--r--xmlsecurity/source/framework/elementcollector.cxx20
-rw-r--r--xmlsecurity/source/framework/elementcollector.hxx5
-rw-r--r--xmlsecurity/source/framework/elementmark.cxx5
-rw-r--r--xmlsecurity/source/framework/elementmark.hxx5
-rw-r--r--xmlsecurity/source/framework/encryptionengine.cxx11
-rw-r--r--xmlsecurity/source/framework/encryptionengine.hxx5
-rw-r--r--xmlsecurity/source/framework/encryptorimpl.cxx11
-rw-r--r--xmlsecurity/source/framework/encryptorimpl.hxx7
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.cxx41
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.hxx8
-rw-r--r--xmlsecurity/source/framework/securityengine.cxx2
-rw-r--r--xmlsecurity/source/framework/securityengine.hxx6
-rw-r--r--xmlsecurity/source/framework/signaturecreatorimpl.cxx14
-rw-r--r--xmlsecurity/source/framework/signaturecreatorimpl.hxx6
-rw-r--r--xmlsecurity/source/framework/signatureengine.cxx12
-rw-r--r--xmlsecurity/source/framework/signatureengine.hxx7
-rw-r--r--xmlsecurity/source/framework/signatureverifierimpl.cxx11
-rw-r--r--xmlsecurity/source/framework/signatureverifierimpl.hxx6
-rw-r--r--xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx6
-rw-r--r--xmlsecurity/source/framework/xmlencryptiontemplateimpl.hxx7
-rw-r--r--xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx6
-rw-r--r--xmlsecurity/source/framework/xmlsignaturetemplateimpl.hxx9
-rw-r--r--xmlsecurity/source/framework/xsec_framework.cxx2
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx18
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx32
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper2.cxx2
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper2.hxx2
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx188
-rw-r--r--xmlsecurity/source/helper/xsecctl.hxx39
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx36
-rw-r--r--xmlsecurity/source/helper/xsecparser.hxx8
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx4
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx12
-rw-r--r--xmlsecurity/source/xmlsec/biginteger.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx2
-rw-r--r--xmlsecurity/source/xmlsec/certvalidity.cxx38
-rw-r--r--xmlsecurity/source/xmlsec/diagnose.cxx6
-rw-r--r--xmlsecurity/source/xmlsec/diagnose.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/errorcallback.cxx139
-rw-r--r--xmlsecurity/source/xmlsec/errorcallback.hxx4
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/oid.hxx3
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx79
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx57
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx7
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx15
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx18
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx12
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx7
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx30
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/certerrors.h20
-rw-r--r--xmlsecurity/source/xmlsec/nss/makefile.mk15
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssrenam.h3
-rw-r--r--xmlsecurity/source/xmlsec/nss/secerror.cxx11
-rw-r--r--xmlsecurity/source/xmlsec/nss/secerror.hxx5
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx108
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx16
-rw-r--r--xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx19
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx7
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx52
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx134
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx20
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/nss/xsec_nss.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.cxx17
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.hxx2
-rw-r--r--xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx41
-rw-r--r--xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx9
-rw-r--r--xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx15
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.hxx4
-rw-r--r--xmlsecurity/source/xmlsec/xsec_xmlsec.cxx2
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/aia_ca_issuers.odtbin9511 -> 9511 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/aia_ocsp.odtbin9376 -> 9376 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/aia_ocsp_revoked_chain.odtbin9370 -> 9370 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf.odtbin9379 -> 9379 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf_chain.odtbin9378 -> 9378 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crl.odtbin9354 -> 9354 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crl_revoked_chain.odtbin9352 -> 9352 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crl_revoked_leaf.odtbin9363 -> 9363 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crl_revoked_leaf_chain.odtbin9351 -> 9351 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crldp.odtbin9379 -> 9379 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crldp_no_intermediate_ca_revocation_info.odtbin9382 -> 9382 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crldp_no_root_revocation_info.odtbin9379 -> 9379 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crldp_revoked_chain.odtbin9381 -> 9381 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crldp_revoked_leaf.odtbin9380 -> 9380 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/crldp_revoked_leaf_chain.odtbin9383 -> 9383 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/dn_cyrillic_bmpstring.odtbin9392 -> 9392 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/dn_latin_ext_greak_bmpstring.odtbin9388 -> 9388 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/dn_multivalue_rdn.odtbin9272 -> 9272 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/dn_quoting.odtbin28429 -> 28429 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odtbin9299 -> 9299 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odtbin9313 -> 9313 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/incomplete_path.odtbin9308 -> 9308 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo2_x_doc1.odtbin9550 -> 9550 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo2_x_doc2.odtbin6989 -> 6989 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo2_x_macro1.odtbin12911 -> 12911 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo2_x_macro2.odtbin12929 -> 12929 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo2_x_macro3.odtbin13043 -> 13043 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo2_x_macro4.odtbin13079 -> 13079 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo2_x_macro5.odtbin20336 -> 20336 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo3_2_doc1.odtbin9200 -> 9200 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo3_2_doc3.odtbin8908 -> 8908 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo3_2_doc4.odtbin8997 -> 8997 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/invalid_ooo_3_2_doc2.odtbin9199 -> 9199 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/ocsp_crl.odtbin9444 -> 9444 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/ocsp_crl_revoked_leaf.odtbin9447 -> 9447 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/stateOrProvinceName.odtbin10534 -> 10534 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_no_revocation.odtbin9341 -> 9341 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_no_root_revocation_info.odtbin9349 -> 9349 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_no_sub_ca_revocation_info.odtbin9352 -> 9352 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo2_x_doc1.odtbin9880 -> 9880 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo2_x_doc_macro.odtbin12425 -> 12425 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo2_x_doc_unsigned_macro.odtbin10821 -> 10821 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo3_0_doc1.odtbin12565 -> 12565 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo3_0_doc_macro.odtbin15656 -> 15656 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo3_0_doc_unsigned_macro.odtbin13975 -> 13975 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo3_2_doc1.odtbin12514 -> 12514 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo3_2_doc_macro.odtbin15579 -> 15579 bytes
-rw-r--r--[-rwxr-xr-x]xmlsecurity/test_docs/documents/valid_ooo3_2_doc_unsigned_macro.odtbin13929 -> 13929 bytes
-rwxr-xr-xxmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java3
-rw-r--r--xmlsecurity/tools/demo/mozprofile.cxx2
-rw-r--r--xmlsecurity/tools/demo/multisigdemo.cxx3
-rw-r--r--xmlsecurity/tools/demo/performance.cxx71
-rw-r--r--xmlsecurity/tools/demo/signdemo.cxx2
-rw-r--r--xmlsecurity/tools/demo/util.cxx5
-rw-r--r--xmlsecurity/tools/demo/util.hxx3
-rw-r--r--xmlsecurity/tools/demo/util2.cxx79
-rw-r--r--xmlsecurity/tools/demo/verifydemo.cxx2
-rw-r--r--xmlsecurity/tools/standalone/csfit/certmngr.cxx6
-rw-r--r--xmlsecurity/tools/standalone/csfit/decrypter.cxx14
-rw-r--r--xmlsecurity/tools/standalone/csfit/encrypter.cxx16
-rw-r--r--xmlsecurity/tools/standalone/csfit/helper.cxx26
-rw-r--r--xmlsecurity/tools/standalone/csfit/helper.hxx4
-rw-r--r--xmlsecurity/tools/standalone/csfit/signer.cxx14
-rw-r--r--xmlsecurity/tools/standalone/csfit/verifier.cxx14
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/certmngr.cxx6
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/decrypter.cxx14
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/encrypter.cxx16
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/helper.cxx26
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/helper.hxx4
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/makefile.mk16
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/signer.cxx14
-rw-r--r--xmlsecurity/tools/standalone/mscsfit/verifier.cxx15
-rw-r--r--xmlsecurity/util/makefile.mk5
-rw-r--r--xmlsecurity/util/target.pmk1
-rw-r--r--xmlsecurity/workben/makefile.mk1
-rw-r--r--xmlsecurity/workben/signaturetest.cxx209
194 files changed, 653 insertions, 1876 deletions
diff --git a/xmlsecurity/inc/pch/precompiled_xmlsecurity.cxx b/xmlsecurity/inc/pch/precompiled_xmlsecurity.cxx
index 42b0254306c2..7aa8a6192009 100644
--- a/xmlsecurity/inc/pch/precompiled_xmlsecurity.cxx
+++ b/xmlsecurity/inc/pch/precompiled_xmlsecurity.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_xmlsecurity.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
index f2701c727e99..ade8fb78ecc0 100644
--- a/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
+++ b/xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,4 @@
#ifdef PRECOMPILED_HEADERS
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/biginteger.hxx b/xmlsecurity/inc/xmlsecurity/biginteger.hxx
index b77c7c3bb8c6..74d25bef987d 100644
--- a/xmlsecurity/inc/xmlsecurity/biginteger.hxx
+++ b/xmlsecurity/inc/xmlsecurity/biginteger.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include "com/sun/star/uno/Sequence.h"
rtl::OUString bigIntegerToNumericString( ::com::sun::star::uno::Sequence< sal_Int8 > serial );
@@ -41,3 +40,4 @@ rtl::OUString bigIntegerToNumericString( ::com::sun::star::uno::Sequence< sal_In
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
index fa259cadc647..867eee8997b1 100644
--- a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,7 +61,7 @@ private:
SignatureInformations maCertsToIgnore;
FixedText maHintFT;
- SvxSimpleTable maCertLB; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+ SvxSimpleTable maCertLB; // #i48648 now SvHeaderTabListBox
PushButton maViewBtn;
@@ -92,3 +93,4 @@ public:
#endif // _XMLSECURITY_CERTIFICATECHOOSER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index 622a912e788e..1734d69aeb4a 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,7 +114,7 @@ public:
class CertificateViewerDetailsTP : public CertificateViewerTP
{
private:
- SvxSimpleTable maElementsLB; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+ SvxSimpleTable maElementsLB; // #i48648 now SvHeaderTabListBox
MultiLineEdit maElementML;
Font maStdFont;
Font maFixedWidthFont;
@@ -163,3 +164,4 @@ public:
#endif // _XMLSECURITY_CERTIFICATEVIEWER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/certvalidity.hxx b/xmlsecurity/inc/xmlsecurity/certvalidity.hxx
index 20fb05579029..837d5c29786d 100644
--- a/xmlsecurity/inc/xmlsecurity/certvalidity.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certvalidity.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,3 +36,4 @@ rtl::OUString certificateValidityToOUString( ::sal_Int32 certValidity ) ;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
index 1acc3733e2d3..74a5b8073af6 100644
--- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,7 +80,7 @@ private:
FixedText maHintDocFT;
FixedText maHintBasicFT;
FixedText maHintPackageFT;
- SvxSimpleTable maSignaturesLB; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+ SvxSimpleTable maSignaturesLB; // #i48648 now SvHeaderTabListBox
FixedImage maSigsValidImg;
FixedInfo maSigsValidFI;
FixedImage maSigsInvalidImg;
@@ -148,3 +149,4 @@ public:
#endif // _XMLSECURITY_DIGITALSIGNATURESDIALOG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/documentsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/documentsignaturehelper.hxx
index 14d6a160bd01..beb089060039 100644
--- a/xmlsecurity/inc/xmlsecurity/documentsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsecurity/documentsignaturehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,5 @@ public:
};
#endif // _XMLSECURITY_XMLSIGNATUREHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/global.hrc b/xmlsecurity/inc/xmlsecurity/global.hrc
index 57a9a95e88b3..5ec98db80b1e 100644
--- a/xmlsecurity/inc/xmlsecurity/global.hrc
+++ b/xmlsecurity/inc/xmlsecurity/global.hrc
@@ -42,7 +42,6 @@
#define RID_XMLSECTP_MACROWARN 1009
#define RID_XMLSECTP_READONLY_CONFIG_TIP 1010
#define RID_XMLSECTP_LOCK 1011
-#define RID_XMLSECTP_LOCK_HC 1012
#define RID_XMLSECWB_NO_MOZILLA_PROFILE 1013
#endif
diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
index 6ebab6d99265..da4a43e5cf60 100644
--- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
+++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -137,7 +138,7 @@ class MacroSecurityTrustedSourcesTP : public MacroSecurityTP
private:
FixedLine maTrustCertFL;
ReadOnlyImage maTrustCertROFI;
- SvxSimpleTable maTrustCertLB; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+ SvxSimpleTable maTrustCertLB; // #i48648 now SvHeaderTabListBox
PushButton maAddCertPB;
PushButton maViewCertPB;
PushButton maRemoveCertPB;
@@ -173,3 +174,4 @@ public:
#endif // _XMLSECURITY_MACROSECURITY_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/sigstruct.hxx b/xmlsecurity/inc/xmlsecurity/sigstruct.hxx
index 345380835d70..fb1be3f86137 100644
--- a/xmlsecurity/inc/xmlsecurity/sigstruct.hxx
+++ b/xmlsecurity/inc/xmlsecurity/sigstruct.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,4 @@ typedef ::std::vector< SignatureInformation > SignatureInformations;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx b/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx
index 8e99a393ace2..2f7f969e6054 100644
--- a/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx
+++ b/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/warnings.hxx b/xmlsecurity/inc/xmlsecurity/warnings.hxx
index a8f0b033616d..8ac38118f4c0 100644
--- a/xmlsecurity/inc/xmlsecurity/warnings.hxx
+++ b/xmlsecurity/inc/xmlsecurity/warnings.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
index 932c37f81252..d0d3bbe8d012 100644
--- a/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -204,3 +205,5 @@ public:
};
#endif // _XMLSECURITY_XMLSIGNATUREHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/prj/build.lst b/xmlsecurity/prj/build.lst
index f480685a7dad..422f4a43b65d 100644
--- a/xmlsecurity/prj/build.lst
+++ b/xmlsecurity/prj/build.lst
@@ -1,4 +1,4 @@
-xs xmlsecurity : L10N:l10n xmloff unotools offapi unoil svx MOZ:moz SO:moz_prebuilt LIBXMLSEC:libxmlsec NSS:nss LIBXSLT:libxslt NEON:neon NULL
+xs xmlsecurity : TRANSLATIONS:translations xmloff unotools offapi unoil svx MOZ:moz LIBXMLSEC:libxmlsec NSS:nss LIBXSLT:libxslt NEON:neon NULL
xs xmlsecurity usr1 - all xs_mkout NULL
xs xmlsecurity\inc nmake - all xs_inc NULL
xs xmlsecurity\source\framework nmake - all xs_fw xs_inc NULL
diff --git a/xmlsecurity/source/component/certificatecontainer.cxx b/xmlsecurity/source/component/certificatecontainer.cxx
index d490e500b2c3..97c5c08864d6 100644
--- a/xmlsecurity/source/component/certificatecontainer.cxx
+++ b/xmlsecurity/source/component/certificatecontainer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,7 +46,7 @@ CertificateContainer::searchMap( const ::rtl::OUString & url, const ::rtl::OUStr
ret = (sal_Bool) (*p).second.equals(certificate_name);
if( ret )
break;
- p++;
+ ++p;
}
return ret;
@@ -134,7 +135,7 @@ CertificateContainer::impl_getStaticSupportedServiceNames( )
throw(::com::sun::star::uno::RuntimeException)
{
Sequence< ::rtl::OUString > aRet(1);
- *aRet.getArray() = ::rtl::OUString::createFromAscii("com.sun.star.security.CertificateContainer");
+ *aRet.getArray() = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.security.CertificateContainer"));
return aRet;
}
@@ -144,7 +145,7 @@ CertificateContainer::impl_getStaticSupportedServiceNames( )
CertificateContainer::impl_getStaticImplementationName()
throw(::com::sun::star::uno::RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.security.CertificateContainer");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.security.CertificateContainer"));
}
//-------------------------------------------------------------------------
@@ -169,3 +170,4 @@ CertificateContainer::impl_createFactory( const Reference< XMultiServiceFactory
return xReturn;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/component/certificatecontainer.hxx b/xmlsecurity/source/component/certificatecontainer.hxx
index 3bf11cd55d92..abea11bf61f0 100644
--- a/xmlsecurity/source/component/certificatecontainer.hxx
+++ b/xmlsecurity/source/component/certificatecontainer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,13 +35,9 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase2.hxx>
-#ifndef _XCERTIFICATECONTAINER_HPP_
#include <com/sun/star/security/XCertificateContainer.hpp>
-#endif
-#ifndef _CERTIFICATECONTAINERSTATUS_HPP_
#include <com/sun/star/security/CertificateContainerStatus.hpp>
-#endif
#include <vector>
@@ -97,3 +94,4 @@ class CertificateContainer : public ::cppu::WeakImplHelper2< ::com::sun::star::l
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 0c8250848efa..cd6a451b1109 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -319,7 +320,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
if (!rSigInfo.Signer.is())
rSigInfo.Signer = xSecEnv->getCertificate( rInfo.ouX509IssuerName, xSerialNumberAdapter->toSequence( rInfo.ouX509SerialNumber ) );
- // --> PB 2004-12-14 #i38744# time support again
+ // Time support again (#i38744#)
Date aDate( rInfo.stDateTime.Day, rInfo.stDateTime.Month, rInfo.stDateTime.Year );
Time aTime( rInfo.stDateTime.Hours, rInfo.stDateTime.Minutes,
rInfo.stDateTime.Seconds, rInfo.stDateTime.HundredthSeconds );
@@ -339,7 +340,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(rSigInfo.Signer,
Sequence<Reference<css::security::XCertificate> >());
} catch (SecurityException& ) {
- OSL_ENSURE(0, "Verification of certificate failed");
+ OSL_FAIL("Verification of certificate failed");
rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
}
}
@@ -514,3 +515,4 @@ Reference< XInterface > DocumentDigitalSignatures_CreateInstance(
return (cppu::OWeakObject*) new DocumentDigitalSignatures( rCtx );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.hxx b/xmlsecurity/source/component/documentdigitalsignatures.hxx
index 1102c65b43cb..3525370d10b5 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.hxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,3 +100,5 @@ com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL Docum
const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rCtx) throw ( com::sun::star::uno::Exception );
#endif // _XMLSECURITY_DOCUMENTDIGITALSIGNATURES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/component/registerservices.cxx b/xmlsecurity/source/component/registerservices.cxx
index 0f6efeff05ce..ec5511128ece 100644
--- a/xmlsecurity/source/component/registerservices.cxx
+++ b/xmlsecurity/source/component/registerservices.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pService
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 9e934d4e04f8..873c537399ab 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -187,7 +188,7 @@ void CertificateChooser::ImplInitialize()
sEntry += '\t';
sEntry += XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() );
SvLBoxEntry* pEntry = maCertLB.InsertEntry( sEntry );
- pEntry->SetUserData( ( void* )nC ); // missuse user data as index
+ pEntry->SetUserData( ( void* )(sal_IntPtr)nC ); // missuse user data as index
}
// enable/disable buttons
@@ -236,3 +237,4 @@ void CertificateChooser::ImplShowCertificateDetails()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 3b38045938f2..ab24224bc91c 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,24 +120,18 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif
,maKeyImg ( this, XMLSEC_RES( IMG_KEY ) )
,maHintCorrespPrivKeyFI ( this, XMLSEC_RES( FI_CORRPRIVKEY ) )
{
- if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
- maKeyImg.SetImage( Image( XMLSEC_RES( IMG_KEY_HC ) ) );
-
//Verify the certificate
sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(mpDlg->mxCert,
Sequence<Reference<css::security::XCertificate> >());
bool bCertValid = certStatus == css::security::CertificateValidity::VALID ? true : false;
- bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
if ( !bCertValid )
{
maCertImg.SetImage(
- Image( XMLSEC_RES( bHC ? IMG_STATE_NOT_VALIDATED_HC : IMG_STATE_NOT_VALIDATED ) ) );
+ Image( XMLSEC_RES( IMG_STATE_NOT_VALIDATED ) ) );
maHintNotTrustedFI.SetText( String( XMLSEC_RES( STR_CERTIFICATE_NOT_VALIDATED ) ) );
}
- else if ( bHC )
- maCertImg.SetImage( Image( XMLSEC_RES( IMG_STATE_CERIFICATED_HC ) ) );
FreeResource();
@@ -290,10 +285,9 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( Window* _pParent, Certif
const char* pHexSep = " ";
String aLBEntry;
String aDetails;
- // --> PB 2004-10-11 #i35107# - 0 == "V1", 1 == "V2", ..., n = "V(n+1)"
+ // Certificate Versions are reported wrong (#i35107#) - 0 == "V1", 1 == "V2", ..., n = "V(n+1)"
aLBEntry = String::CreateFromAscii( "V" );
aLBEntry += String::CreateFromInt32( xCert->getVersion() + 1 );
- // <--
InsertElement( String( XMLSEC_RES( STR_VERSION ) ), aLBEntry, aLBEntry );
Sequence< sal_Int8 > aSeq = xCert->getSerialNumber();
aLBEntry = XmlSec::GetHexString( aSeq, pHexSep );
@@ -419,12 +413,6 @@ CertificateViewerCertPathTP::CertificateViewerCertPathTP( Window* _pParent, Cert
,msCertNotValidated ( XMLSEC_RES( STR_PATH_CERT_NOT_VALIDATED ) )
{
- if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
- {
- maCertImage = Image( XMLSEC_RES( IMG_CERT_SMALL_HC ) );
- maCertNotValidatedImage = Image( XMLSEC_RES( IMG_CERT_NOTVALIDATED_SMALL_HC ) );
- }
-
FreeResource();
maCertPathLB.SetNodeDefaultImages();
@@ -548,3 +536,4 @@ SvLBoxEntry* CertificateViewerCertPathTP::InsertCert(
return pEntry;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/certificateviewer.src b/xmlsecurity/source/dialogs/certificateviewer.src
index 637d3a7f45fe..88fed2fa1865 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.src
+++ b/xmlsecurity/source/dialogs/certificateviewer.src
@@ -174,21 +174,6 @@ TabPage RID_XMLSECTP_GENERAL
ImageBitmap = Bitmap { File = "notcertificate_40x56.png"; };
MaskColor = STD_MASKCOLOR;
};
- Image IMG_STATE_CERIFICATED_HC
- {
- ImageBitmap = Bitmap { File = "certificate_40x56_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
- Image IMG_STATE_NOT_VALIDATED_HC
- {
- ImageBitmap = Bitmap { File = "notcertificate_40x56_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
- Image IMG_KEY_HC
- {
- ImageBitmap = Bitmap { File = "key_12_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
};
TabPage RID_XMLSECTP_DETAILS
@@ -324,21 +309,11 @@ TabPage RID_XMLSECTP_CERTPATH
ImageBitmap = Bitmap { File = "certificate_16.png"; };
MaskColor = STD_MASKCOLOR;
};
- Image IMG_CERT_SMALL_HC
- {
- ImageBitmap = Bitmap { File = "certificate_16_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
Image IMG_CERT_NOTVALIDATED_SMALL
{
ImageBitmap = Bitmap { File = "notcertificate_16.png"; };
MaskColor = STD_MASKCOLOR;
};
- Image IMG_CERT_NOTVALIDATED_SMALL_HC
- {
- ImageBitmap = Bitmap { File = "notcertificate_16_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
String STR_PATH_CERT_OK
{
Text [ en-US ] = "The certificate is OK.";
diff --git a/xmlsecurity/source/dialogs/dialogs.hrc b/xmlsecurity/source/dialogs/dialogs.hrc
index b30eb9198e32..d315f7ccc020 100644
--- a/xmlsecurity/source/dialogs/dialogs.hrc
+++ b/xmlsecurity/source/dialogs/dialogs.hrc
@@ -82,9 +82,6 @@
#define FI_STATE_BROKEN 10
#define IMG_STATE_NOTVALIDATED 11
#define FI_STATE_NOTVALIDATED 12
-#define IMG_STATE_VALID_HC 13
-#define IMG_STATE_BROKEN_HC 14
-#define IMG_STATE_NOTVALIDATED_HC 15
#define FI_STATE_OLDSIGNATURE 16
//#define DS_WIDTH DLGS_WIDTH
@@ -175,9 +172,6 @@
#define FI_CORRPRIVKEY 14
#define STR_CERTIFICATE_NOT_VALIDATED 15
#define IMG_STATE_NOT_VALIDATED 16
-#define IMG_STATE_CERIFICATED_HC 17
-#define IMG_STATE_NOT_VALIDATED_HC 18
-#define IMG_KEY_HC 19
#define IMG1_WIDTH 33
#define IMG1_HEIGHT 22
@@ -237,9 +231,7 @@
#define FT_CERTSTATUS 2
#define ML_CERTSTATUS 3
#define IMG_CERT_SMALL 4
-#define IMG_CERT_SMALL_HC 5
#define IMG_CERT_NOTVALIDATED_SMALL 6
-#define IMG_CERT_NOTVALIDATED_SMALL_HC 7
#define STR_PATH_CERT_OK 8
#define STR_PATH_CERT_NOT_VALIDATED 9
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 51f9924a61ed..ac9cd08082ff 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -220,14 +221,6 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
maSigsNotvalidatedFI.SetText( String( XMLSEC_RES( STR_NO_INFO_TO_VERIFY ) ) );
- if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
- {
- // high contrast mode needs other images
- maSigsValidImg.SetImage( Image( XMLSEC_RES( IMG_STATE_VALID_HC ) ) );
- maSigsInvalidImg.SetImage( Image( XMLSEC_RES( IMG_STATE_BROKEN_HC ) ) );
- maSigsNotvalidatedImg.SetImage( Image( XMLSEC_RES( IMG_STATE_NOTVALIDATED_HC ) ) );
- }
-
FreeResource();
mbVerifySignatures = true;
@@ -398,8 +391,8 @@ IMPL_LINK( DigitalSignaturesDialog, OKButtonHdl, void*, EMPTYARG )
uno::Reference< com::sun::star::xml::sax::XDocumentHandler> xDocumentHandler =
maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
- int nInfos = maCurrentSignatureInformations.size();
- for( int n = 0 ; n < nInfos ; ++n )
+ size_t nInfos = maCurrentSignatureInformations.size();
+ for( size_t n = 0 ; n < nInfos ; ++n )
maSignatureHelper.ExportSignature(
xDocumentHandler, maCurrentSignatureInformations[ n ] );
@@ -451,7 +444,7 @@ IMPL_LINK( DigitalSignaturesDialog, AddButtonHdl, Button*, EMPTYARG )
rtl::OUString aCertSerial = xSerialNumberAdapter->toString( xCert->getSerialNumber() );
if ( !aCertSerial.getLength() )
{
- DBG_ERROR( "Error in Certificate, problem with serial number!" );
+ OSL_FAIL( "Error in Certificate, problem with serial number!" );
return -1;
}
@@ -492,8 +485,8 @@ IMPL_LINK( DigitalSignaturesDialog, AddButtonHdl, Button*, EMPTYARG )
maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
// Export old signatures...
- int nInfos = maCurrentSignatureInformations.size();
- for ( int n = 0; n < nInfos; n++ )
+ size_t nInfos = maCurrentSignatureInformations.size();
+ for ( size_t n = 0; n < nInfos; n++ )
maSignatureHelper.ExportSignature( xDocumentHandler, maCurrentSignatureInformations[n]);
// Create a new one...
@@ -526,7 +519,7 @@ IMPL_LINK( DigitalSignaturesDialog, AddButtonHdl, Button*, EMPTYARG )
}
catch ( uno::Exception& )
{
- DBG_ERROR( "Exception while adding a signature!" );
+ OSL_FAIL( "Exception while adding a signature!" );
// Don't keep invalid entries...
ImplGetSignatureInformations(true);
ImplFillSignaturesBox();
@@ -554,8 +547,8 @@ IMPL_LINK( DigitalSignaturesDialog, RemoveButtonHdl, Button*, EMPTYARG )
Reference< css::xml::sax::XDocumentHandler> xDocumentHandler =
maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
- int nInfos = maCurrentSignatureInformations.size();
- for( int n = 0 ; n < nInfos ; ++n )
+ size_t nInfos = maCurrentSignatureInformations.size();
+ for( size_t n = 0 ; n < nInfos ; ++n )
maSignatureHelper.ExportSignature( xDocumentHandler, maCurrentSignatureInformations[ n ] );
maSignatureHelper.CloseDocumentHandler( xDocumentHandler);
@@ -568,7 +561,7 @@ IMPL_LINK( DigitalSignaturesDialog, RemoveButtonHdl, Button*, EMPTYARG )
}
catch ( uno::Exception& )
{
- DBG_ERROR( "Exception while removing a signature!" );
+ OSL_FAIL( "Exception while removing a signature!" );
// Don't keep invalid entries...
ImplGetSignatureInformations(true);
ImplFillSignaturesBox();
@@ -594,13 +587,13 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
uno::Reference< ::com::sun::star::security::XCertificate > xCert;
String aNullStr;
- int nInfos = maCurrentSignatureInformations.size();
- int nValidSigs = 0, nValidCerts = 0;
+ size_t nInfos = maCurrentSignatureInformations.size();
+ size_t nValidSigs = 0, nValidCerts = 0;
bool bAllNewSignatures = true;
if( nInfos )
{
- for( int n = 0; n < nInfos; ++n )
+ for( size_t n = 0; n < nInfos; ++n )
{
DocumentSignatureAlgorithm mode = DocumentSignatureHelper::getDocumentAlgorithm(
m_sODFVersion, maCurrentSignatureInformations[n]);
@@ -647,13 +640,13 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
nValidCerts++;
} catch (css::uno::SecurityException& ) {
- OSL_ENSURE(0, "Verification of certificate failed");
+ OSL_FAIL("Verification of certificate failed");
bCertValid = false;
}
aSubject = XmlSec::GetContentPart( xCert->getSubjectName() );
aIssuer = XmlSec::GetContentPart( xCert->getIssuerName() );
- // --> PB 2004-10-12 #i20172# String with date and time information
+ // String with date and time information (#i20172#)
aDateTimeStr = XmlSec::GetDateTimeString( rInfo.stDateTime );
}
bSigValid = ( rInfo.nStatus == ::com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED );
@@ -694,7 +687,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
else if (meSignatureMode == SignatureModeMacros
&& bSigValid && bCertValid)
{
- aImage = aImage = maSigsValidImg.GetImage();
+ aImage = maSigsValidImg.GetImage();
}
SvLBoxEntry* pEntry = maSignaturesLB.InsertEntry( aNullStr, aImage, aImage );
@@ -844,3 +837,4 @@ SignatureStreamHelper DigitalSignaturesDialog::ImplOpenSignatureStream(
return aHelper;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
index 54ef5ce17eeb..16b2219d7f08 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
@@ -181,21 +181,6 @@ ModalDialog RID_XMLSECDLG_DIGSIG
Pos = MAP_APPFONT( 6, 171 );
Size = MAP_APPFONT( 50, 14 );
};
- Image IMG_STATE_VALID_HC
- {
- ImageBitmap = Bitmap { File = "signet_11x16_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
- Image IMG_STATE_BROKEN_HC
- {
- ImageBitmap = Bitmap { File = "caution_11x16_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
- Image IMG_STATE_NOTVALIDATED_HC
- {
- ImageBitmap = Bitmap { File = "notcertificate_16_h.png"; };
- MaskColor = STD_MASKCOLOR;
- };
};
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 6e9498c264b5..02e03912c3ba 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -138,7 +139,7 @@ MacroSecurityLevelTP::MacroSecurityLevelTP( Window* _pParent, MacroSecurity* _pD
pCheck->Check();
else
{
- DBG_ERROR("illegal macro security level");
+ OSL_FAIL("illegal macro security level");
}
maSecReadonlyFI.Show(bReadonly);
if(bReadonly)
@@ -281,7 +282,7 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveLocPBHdl, void*, EMPTYARG )
if( nSel != LISTBOX_ENTRY_NOTFOUND )
{
maTrustFileLocLB.RemoveEntry( nSel );
- // --> PB 2004-09-21 #i33584#
+ // Trusted Path could not be removed (#i33584#)
// after remove an entry, select another one if exists
sal_uInt16 nNewCount = maTrustFileLocLB.GetEntryCount();
if ( nNewCount > 0 )
@@ -290,7 +291,6 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveLocPBHdl, void*, EMPTYARG )
nSel = nNewCount - 1;
maTrustFileLocLB.SelectEntryPos( nSel );
}
- // <--
ImplCheckButtons();
}
@@ -328,7 +328,7 @@ void MacroSecurityTrustedSourcesTP::FillCertLB( void )
SvLBoxEntry* pLBEntry = maTrustCertLB.InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
maTrustCertLB.SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
maTrustCertLB.SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
- pLBEntry->SetUserData( ( void* ) sal_Int32( nEntry ) ); // missuse user data as index
+ pLBEntry->SetUserData( ( void* ) (sal_IntPtr)nEntry ); // missuse user data as index
}
}
}
@@ -411,33 +411,24 @@ void MacroSecurityTrustedSourcesTP::ClosePage( void )
mpDlg->maSecOptions.SetSecureURLs( aSecureURLs );
}
- // --> PB 2004-09-21 #i33584#
+ // Trusted Path could not be removed (#i33584#)
// don't forget to remove the old saved SecureURLs
else
mpDlg->maSecOptions.SetSecureURLs( cssu::Sequence< rtl::OUString >() );
- // <--
mpDlg->maSecOptions.SetTrustedAuthors( maTrustedAuthors );
}
-/*-- 26.02.2004 13:31:04---------------------------------------------------
- -----------------------------------------------------------------------*/
ReadOnlyImage::ReadOnlyImage(Window* pParent, const ResId rResId) :
FixedImage(pParent, rResId)
{
- sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode();
- SetImage( Image(XMLSEC_RES( bHighContrast ? RID_XMLSECTP_LOCK_HC : RID_XMLSECTP_LOCK )));
+ SetImage( Image(XMLSEC_RES( RID_XMLSECTP_LOCK )));
}
-/*-- 26.02.2004 13:31:04---------------------------------------------------
-
- -----------------------------------------------------------------------*/
ReadOnlyImage::~ReadOnlyImage()
{
}
-/*-- 26.02.2004 13:31:04---------------------------------------------------
- -----------------------------------------------------------------------*/
void ReadOnlyImage::RequestHelp( const HelpEvent& rHEvt )
{
if( Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled() )
@@ -457,12 +448,10 @@ void ReadOnlyImage::RequestHelp( const HelpEvent& rHEvt )
Window::RequestHelp( rHEvt );
}
-/*-- 26.02.2004 14:20:21---------------------------------------------------
-
- -----------------------------------------------------------------------*/
const String& ReadOnlyImage::GetHelpTip()
{
static String aStr(XMLSEC_RES( RID_XMLSECTP_READONLY_CONFIG_TIP));
return aStr;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/macrosecurity.src b/xmlsecurity/source/dialogs/macrosecurity.src
index 5a4ab4f12b10..c86da19e510c 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.src
+++ b/xmlsecurity/source/dialogs/macrosecurity.src
@@ -239,12 +239,3 @@ Image RID_XMLSECTP_LOCK
};
MaskColor = Color { Red=0xffff; Green=0x0000; Blue=0xffff; };
};
-Image RID_XMLSECTP_LOCK_HC
-{
- ImageBitmap = Bitmap
- {
- File = "lock_hc.bmp";
- };
- MaskColor = Color { Red=0xffff; Green=0x0000; Blue=0xffff; };
-};
-
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx
index 25de43ac4566..09d68d8ca595 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,7 +79,7 @@ namespace XmlSec
String GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT )
{
- // --> PB 2004-10-12 #i20172# String with date and time information
+ // String with date and time information (#i20172#)
DateTime aDT( GetDateTime( _rDT ) );
const LocaleDataWrapper& rLoDa = GetLocaleData();
String sRet( rLoDa.getDate( aDT ) );
@@ -126,7 +127,7 @@ namespace XmlSec
::rtl::OUStringBuffer s1, s2;
OUString sEqual(RTL_CONSTASCII_USTRINGPARAM(" = "));
typedef vector< pair < OUString, OUString > >::const_iterator CIT;
- for (CIT i = vecAttrValueOfDN.begin(); i < vecAttrValueOfDN.end(); i ++)
+ for (CIT i = vecAttrValueOfDN.begin(); i < vecAttrValueOfDN.end(); ++i)
{
if (i != vecAttrValueOfDN.begin())
{
@@ -343,7 +344,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
{
OUString sPartId = OUString::createFromAscii( aIDs[i++] );
typedef vector< pair < OUString, OUString > >::const_iterator CIT;
- for (CIT idn = vecAttrValueOfDN.begin(); idn != vecAttrValueOfDN.end(); idn++)
+ for (CIT idn = vecAttrValueOfDN.begin(); idn != vecAttrValueOfDN.end(); ++idn)
{
if (idn->first.equals(sPartId))
{
@@ -371,7 +372,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
{
nNum = sal_uInt8( pSerNumSeq[ i ] );
- //MM : exchange the buffer[0] and buffer[1], which make it consistent with Mozilla and Windows
+ // exchange the buffer[0] and buffer[1], which make it consistent with Mozilla and Windows
pBuffer[ 1 ] = pHexDigs[ nNum & 0x0F ];
nNum >>= 4;
pBuffer[ 0 ] = pHexDigs[ nNum ];
@@ -429,3 +430,4 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/resourcemanager.hxx b/xmlsecurity/source/dialogs/resourcemanager.hxx
index 0a0615871af3..07b266845e51 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.hxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ namespace XmlSec
#define XMLSEC_RES(id) ResId(id,*XmlSec::GetResMgr())
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/stbcontrl.cxx b/xmlsecurity/source/dialogs/stbcontrl.cxx
index 44395ed5d328..125ca1590068 100644
--- a/xmlsecurity/source/dialogs/stbcontrl.cxx
+++ b/xmlsecurity/source/dialogs/stbcontrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,81 +29,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmlsecurity.hxx"
-// include ---------------------------------------------------------------
#include <tools/shl.hxx>
-#ifndef _STATUS_HXX //autogen
#include <vcl/status.hxx>
-#endif
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
#include <vcl/image.hxx>
-//#ifndef _SFXITEMPOOL_HXX
-//#include <svl/itempool.hxx>
-//#endif
#include <sfx2/app.hxx>
#include <sfx2/module.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
-
#include <svl/eitem.hxx>
-
-
#include <xmlsecurity/stbcontrl.hxx>
#define PAINT_OFFSET 5
-//#include "sizeitem.hxx"
-//#include "dialmgr.hxx"
-//#include "dlgutil.hxx"
-//#include "stbctrls.h"
-
-//#include "dialogs.hrc"
-
-/*#ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX
-#include <unotools/localedatawrapper.hxx>
-#endif
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
-#include <comphelper/processfactory.hxx>
-#endif*/
-
-
-
SFX_IMPL_STATUSBAR_CONTROL( XmlSecStatusBarControl, SfxBoolItem );
-/*
-class FunctionPopup_Impl : public PopupMenu
-{
-public:
- FunctionPopup_Impl( sal_uInt16 nCheck );
-
- sal_uInt16 GetSelected() const { return nSelected; }
-
-private:
- sal_uInt16 nSelected;
-
- virtual void Select();
-};
-
-// -----------------------------------------------------------------------
-
-FunctionPopup_Impl::FunctionPopup_Impl( sal_uInt16 nCheck ) :
- PopupMenu( ResId( RID_SVXMNU_PSZ_FUNC, DIALOG_MGR() ) ),
- nSelected( 0 )
-{
- if (nCheck)
- CheckItem( nCheck );
-}
-
-// -----------------------------------------------------------------------
-
-void FunctionPopup_Impl::Select()
-{
- nSelected = GetCurItemId();
-}
-*/
-
-
struct XmlSecStatusBarControl::XmlSecStatusBarControl_Impl
{
@@ -119,7 +60,6 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( sal_uInt16 _nId, StatusBar& _rSt
,mpImpl( new XmlSecStatusBarControl_Impl )
{
mpImpl->mbSigned = false;
-// pImp->maImage = Image( ResId( RID_SVXBMP_POSITION, DIALOG_MGR() ) );
}
XmlSecStatusBarControl::~XmlSecStatusBarControl()
@@ -186,3 +126,4 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
pDev->SetFillColor( aOldFillColor );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/warnings.cxx b/xmlsecurity/source/dialogs/warnings.cxx
index b92266f427d7..995bb6abba8a 100644
--- a/xmlsecurity/source/dialogs/warnings.cxx
+++ b/xmlsecurity/source/dialogs/warnings.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,7 @@
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <comphelper/sequence.hxx>
-// MM : added for password exception
+// added for password exception
#include <vcl/msgbox.hxx>
#include <com/sun/star/security/NoPasswordException.hpp>
using namespace ::com::sun::star::security;
@@ -143,3 +144,4 @@ IMPL_LINK( MacroWarning, EnableBtnHdl, void*, EMPTYARG )
return 0;
}*/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx
index 5e06d3fbc3b6..0f4f2aa5080b 100644
--- a/xmlsecurity/source/framework/buffernode.cxx
+++ b/xmlsecurity/source/framework/buffernode.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,9 +71,6 @@ bool BufferNode::isECOfBeforeModifyIncluded(sal_Int32 nIgnoredSecurityId) const
* RESULT
* bExist - true if a match found, false otherwise
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -117,9 +115,6 @@ void BufferNode::setReceivedAll()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -152,9 +147,6 @@ void BufferNode::addElementCollector(const ElementCollector* pElementCollector)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -183,9 +175,6 @@ void BufferNode::removeElementCollector(const ElementCollector* pElementCollecto
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -231,9 +220,6 @@ void BufferNode::setBlocker(const ElementMark* pBlocker)
* Because there is only one blocker permited for a BufferNode, so the
* old blocker on this BufferNode, if there is one, will be overcasted.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -266,9 +252,6 @@ rtl::OUString BufferNode::printChildren() const
* RESULT
* result - the information string
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -337,9 +320,6 @@ bool BufferNode::hasAnything() const
* RESULT
* bExist - true if there is, false otherwise.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -367,9 +347,6 @@ bool BufferNode::hasChildren() const
* RESULT
* bExist - true if there is, false otherwise.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -402,9 +379,6 @@ const BufferNode* BufferNode::getFirstChild() const
* child - the first child BufferNode, or NULL if there is no child
* BufferNode.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -443,9 +417,6 @@ void BufferNode::addChild(const BufferNode* pChild, sal_Int32 nPosition)
* If the nPosition is -1, then the new child BufferNode is appended
* at the end.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -484,9 +455,6 @@ void BufferNode::addChild(const BufferNode* pChild)
* NOTES
* The new child BufferNode is appended at the end.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -513,9 +481,6 @@ void BufferNode::removeChild(const BufferNode* pChild)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -552,9 +517,6 @@ sal_Int32 BufferNode::indexOfChild(const BufferNode* pChild) const
* index - the index of that child BufferNode. If that child BufferNode
* is not found, -1 is returned.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -602,9 +564,6 @@ const BufferNode* BufferNode::childAt(sal_Int32 nIndex) const
* child - the child BufferNode at index position, or NULL if the index
* is out of the range of children.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -648,9 +607,6 @@ const BufferNode* BufferNode::getNextSibling() const
* RESULT
* sibling - the next sibling BufferNode, or NULL if there is none.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -686,9 +642,6 @@ const BufferNode* BufferNode::isAncestor(const BufferNode* pDescendant) const
* bIs - true if this BufferNode is an ancestor of the pDescendant,
* false otherwise.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -741,9 +694,6 @@ bool BufferNode::isPrevious(const BufferNode* pFollowing) const
* bIs - true if this BufferNode is ahead in the tree order, false
* otherwise.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -794,9 +744,6 @@ const BufferNode* BufferNode::getNextNodeByTreeOrder() const
* node is;
* 4. otherwise, no "next" node exists.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -877,9 +824,6 @@ void BufferNode::notifyBranch()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -914,9 +858,6 @@ void BufferNode::notifyAncestor()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -949,9 +890,6 @@ void BufferNode::elementCollectorNotify()
* child - the first child BufferNode, or NULL if there is no child
* BufferNode.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1042,9 +980,6 @@ bool BufferNode::isECInSubTreeIncluded(sal_Int32 nIgnoredSecurityId) const
* RESULT
* bExist - true if a match found, false otherwise.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1109,9 +1044,6 @@ bool BufferNode::isECOfBeforeModifyInAncestorIncluded(sal_Int32 nIgnoredSecurity
* RESULT
* bExist - true if a match found, false otherwise.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1157,9 +1089,6 @@ bool BufferNode::isBlockerInSubTreeIncluded(sal_Int32 nIgnoredSecurityId) const
* RESULT
* bExist - true if a match found, false otherwise.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1211,9 +1140,6 @@ const BufferNode* BufferNode::getNextChild(const BufferNode* pChild) const
* nextChild - the next child BufferNode after the pChild, or NULL if
* there is none.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1259,9 +1185,6 @@ void BufferNode::freeAllChildren()
* RESULT
* empty
*
- * HISTORY
- * 30.03.2004 - the correct the memory leak bug
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1277,3 +1200,5 @@ void BufferNode::freeAllChildren()
m_vChildren.clear();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/buffernode.hxx b/xmlsecurity/source/framework/buffernode.hxx
index ec5d071d234b..bdece77655fd 100644
--- a/xmlsecurity/source/framework/buffernode.hxx
+++ b/xmlsecurity/source/framework/buffernode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,9 +55,6 @@ class BufferNode
* BufferNode objects are also in ancestor/descendant relationship.
* This class is used to manipulate the tree of bufferred elements.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -135,3 +133,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/decryptorimpl.cxx b/xmlsecurity/source/framework/decryptorimpl.cxx
index a2fcafc1ca4b..de1c666887c7 100644
--- a/xmlsecurity/source/framework/decryptorimpl.cxx
+++ b/xmlsecurity/source/framework/decryptorimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,9 +74,6 @@ bool DecryptorImpl::checkReady() const
* RESULT
* bReady - true if all conditions are satisfied, false otherwise
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -104,9 +102,6 @@ void DecryptorImpl::notifyResultListener() const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -141,9 +136,6 @@ void DecryptorImpl::startEngine( const cssu::Reference<
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -243,3 +235,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL DecryptorImpl::getSupportedServiceNames
return DecryptorImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/decryptorimpl.hxx b/xmlsecurity/source/framework/decryptorimpl.hxx
index 99aa2822667c..8dcb9880bd78 100644
--- a/xmlsecurity/source/framework/decryptorimpl.hxx
+++ b/xmlsecurity/source/framework/decryptorimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,10 +54,6 @@ class DecryptorImpl : public cppu::ImplInheritanceHelper3
* Collects all resources for decrypting an encryption, then decrypts the
* encryption by invoking a xmlsec-based encryption bridge component.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XDecryptionResultBroadcaster,
- * XInitialization, XServiceInfo
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -134,3 +131,4 @@ SAL_CALL DecryptorImpl_createInstance(
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/elementcollector.cxx b/xmlsecurity/source/framework/elementcollector.cxx
index 7f720bb86250..341a3fd3f920 100644
--- a/xmlsecurity/source/framework/elementcollector.cxx
+++ b/xmlsecurity/source/framework/elementcollector.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,9 +83,6 @@ ElementCollector::ElementCollector(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -128,9 +126,6 @@ void ElementCollector::notifyListener()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -165,9 +160,6 @@ void ElementCollector::setReferenceResolvedListener(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -195,9 +187,6 @@ void ElementCollector::setSecurityId(sal_Int32 nSecurityId)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -229,9 +218,6 @@ void ElementCollector::doNotify()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -268,9 +254,6 @@ ElementCollector* ElementCollector::clone(
* RESULT
* clone - a new ElementCollector
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -294,3 +277,4 @@ ElementCollector* ElementCollector::clone(
return pClonedOne;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/elementcollector.hxx b/xmlsecurity/source/framework/elementcollector.hxx
index acef68b3bc8e..d08044017e1b 100644
--- a/xmlsecurity/source/framework/elementcollector.hxx
+++ b/xmlsecurity/source/framework/elementcollector.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,9 +44,6 @@ class ElementCollector : public ElementMark
* of the ElementMark class, this class also maintains the priority, and
* manages the notify process
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -106,3 +104,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/elementmark.cxx b/xmlsecurity/source/framework/elementmark.cxx
index 3185d5e954dc..5452895cb5c0 100644
--- a/xmlsecurity/source/framework/elementmark.cxx
+++ b/xmlsecurity/source/framework/elementmark.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,9 +62,6 @@ ElementMark::ElementMark(sal_Int32 nSecurityId, sal_Int32 nBufferId)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -103,3 +101,4 @@ sal_Int32 ElementMark::getBufferId() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/elementmark.hxx b/xmlsecurity/source/framework/elementmark.hxx
index 0c08357867b4..9f77c0f31e5e 100644
--- a/xmlsecurity/source/framework/elementmark.hxx
+++ b/xmlsecurity/source/framework/elementmark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,9 +44,6 @@ class ElementMark
* This class maintains the security id, buffer id and its type for a
* buffer node.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -83,3 +81,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/encryptionengine.cxx b/xmlsecurity/source/framework/encryptionengine.cxx
index 53e0c295a192..333672399c77 100644
--- a/xmlsecurity/source/framework/encryptionengine.cxx
+++ b/xmlsecurity/source/framework/encryptionengine.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,9 +72,6 @@ bool EncryptionEngine::checkReady() const
* RESULT
* bReady - true if all conditions are satisfied, false otherwise
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -122,9 +120,6 @@ void EncryptionEngine::tryToPerform( )
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -178,9 +173,6 @@ void EncryptionEngine::clearUp( ) const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -214,3 +206,4 @@ void SAL_CALL EncryptionEngine::setBlockerId( sal_Int32 id )
tryToPerform();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/encryptionengine.hxx b/xmlsecurity/source/framework/encryptionengine.hxx
index 375fcc42b239..a0ae4173f061 100644
--- a/xmlsecurity/source/framework/encryptionengine.hxx
+++ b/xmlsecurity/source/framework/encryptionengine.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,9 +54,6 @@ class EncryptionEngine : public cppu::ImplInheritanceHelper1
* FUNCTION
* Maintains common members and methods related with encryption.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XBlockerMonitor
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -101,3 +99,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/encryptorimpl.cxx b/xmlsecurity/source/framework/encryptorimpl.cxx
index e2ba215e21ff..161b544ca088 100644
--- a/xmlsecurity/source/framework/encryptorimpl.cxx
+++ b/xmlsecurity/source/framework/encryptorimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,9 +75,6 @@ bool EncryptorImpl::checkReady() const
* RESULT
* bReady - true if all conditions are satisfied, false otherwise
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -114,9 +112,6 @@ void EncryptorImpl::notifyResultListener() const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -151,9 +146,6 @@ void EncryptorImpl::startEngine( const cssu::Reference<
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -279,3 +271,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL EncryptorImpl::getSupportedServiceNames
return EncryptorImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/encryptorimpl.hxx b/xmlsecurity/source/framework/encryptorimpl.hxx
index e80540ee9066..50af964adceb 100644
--- a/xmlsecurity/source/framework/encryptorimpl.hxx
+++ b/xmlsecurity/source/framework/encryptorimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <com/sun/star/xml/crypto/sax/XEncryptionResultBroadcaster.hpp>
#include <com/sun/star/xml/crypto/sax/XEncryptionResultListener.hpp>
-#ifndef _COM_SUN_STAR_XML_CRYPTO_SAX_XSIGNATURECOLLECTOR_HPP_
#include <com/sun/star/xml/crypto/sax/XReferenceCollector.hpp>
-#endif
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -57,9 +56,6 @@ class EncryptorImpl : public cppu::ImplInheritanceHelper4
* Collects all resources for an encryption generation, then generates the
* encryption by invoking a xmlsec-based encryption bridge component.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XInitialization, XServiceInfo
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -148,3 +144,4 @@ SAL_CALL EncryptorImpl_createInstance(
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index d5779e623522..a7bb8b8d4e60 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,9 +111,6 @@ void SAXEventKeeperImpl::setCurrentBufferNode(BufferNode* pBufferNode)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -158,9 +156,6 @@ BufferNode* SAXEventKeeperImpl::addNewElementMarkBuffers()
* pBufferNode - the BufferNode that has been connected with both new
* ElementCollectors and new Blocker.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -245,9 +240,6 @@ ElementMark* SAXEventKeeperImpl::findElementMarkBuffer(sal_Int32 nId) const
* pElementMark - the ElementMark with the particular Id, or NULL when
* no such Id exists.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -287,9 +279,6 @@ void SAXEventKeeperImpl::removeElementMarkBuffer(sal_Int32 nId)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -362,9 +351,6 @@ rtl::OUString SAXEventKeeperImpl::printBufferNode(
* RESULT
* info - the information string
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -445,9 +431,6 @@ cssu::Sequence< cssu::Reference< cssxw::XXMLElementWrapper > >
* RESULT
* list - the child Elements list.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -506,9 +489,6 @@ void SAXEventKeeperImpl::smashBufferNode(
* operation can delete all useless bufferred SAX events which are only
* needed by the Blocker to be deleted.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -651,9 +631,6 @@ BufferNode* SAXEventKeeperImpl::findNextBlockingBufferNode(
* pBufferNode - the next blocking BufferNode, or NULL if no such
* BufferNode exists.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -698,9 +675,6 @@ void SAXEventKeeperImpl::diffuse(BufferNode* pBufferNode) const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -735,9 +709,6 @@ void SAXEventKeeperImpl::releaseElementMarkBuffer()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -897,9 +868,6 @@ void SAXEventKeeperImpl::markElementMarkBuffer(sal_Int32 nId)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -942,9 +910,6 @@ sal_Int32 SAXEventKeeperImpl::createElementCollector(
* RESULT
* nId - the Id of the new ElementCollector
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -990,9 +955,6 @@ sal_Int32 SAXEventKeeperImpl::createBlocker(sal_Int32 nSecurityId)
* RESULT
* nId - the Id of the new Blocker
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1461,3 +1423,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL SAXEventKeeperImpl::getSupportedService
return SAXEventKeeperImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.hxx b/xmlsecurity/source/framework/saxeventkeeperimpl.hxx
index 4afe43852f2d..52d1fed61ec4 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.hxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,12 +67,6 @@ class SAXEventKeeperImpl : public cppu::WeakImplHelper6
* Controls SAX events to be bufferred, and controls bufferred SAX events
* to be released.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XSecuritySAXEventKeeper,
- * XReferenceResolvedBroadcaster,
- * XSAXEventKeeperStatusChangeBroadcaster,
- * XDocumentHandler, XInitialization, XServiceInfo
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -367,3 +362,4 @@ SAL_CALL SAXEventKeeperImpl_createInstance( const com::sun::star::uno::Reference
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/securityengine.cxx b/xmlsecurity/source/framework/securityengine.cxx
index eac5e4189565..b6554e343354 100644
--- a/xmlsecurity/source/framework/securityengine.cxx
+++ b/xmlsecurity/source/framework/securityengine.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ sal_Bool SAL_CALL SecurityEngine::endMission( )
return rc;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/securityengine.hxx b/xmlsecurity/source/framework/securityengine.hxx
index c5c9e84977ea..7a36d29bc35b 100644
--- a/xmlsecurity/source/framework/securityengine.hxx
+++ b/xmlsecurity/source/framework/securityengine.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,10 +53,6 @@ class SecurityEngine : public cppu::WeakImplHelper3
* Maintains common members and methods related with security engine
* operation.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XReferenceResolvedListener,
- * XKeyCollector, and XMissionTaker
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -170,3 +167,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
index 761b981237f6..c1717f8ad2f8 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,9 +76,6 @@ bool SignatureCreatorImpl::checkReady() const
* RESULT
* bReady - true if all conditions are satisfied, false otherwise
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -108,9 +106,6 @@ void SignatureCreatorImpl::notifyResultListener() const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -146,9 +141,6 @@ void SignatureCreatorImpl::startEngine( const cssu::Reference<
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -192,9 +184,6 @@ void SignatureCreatorImpl::clearUp() const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -295,3 +284,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL SignatureCreatorImpl::getSupportedServi
return SignatureCreatorImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.hxx b/xmlsecurity/source/framework/signaturecreatorimpl.hxx
index db25bf10f893..f55076e69f42 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.hxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,10 +56,6 @@ class SignatureCreatorImpl : public cppu::ImplInheritanceHelper4
* Collects all resources for a signature generation, then generates the
* signature by invoking a xmlsec-based signature bridge component.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XBlockerMonitor,
- * XInitialization, XServiceInfo
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -145,3 +142,4 @@ SAL_CALL SignatureCreatorImpl_createInstance(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx
index 51fbdb259667..794ad73e3a35 100644
--- a/xmlsecurity/source/framework/signatureengine.cxx
+++ b/xmlsecurity/source/framework/signatureengine.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,9 +72,6 @@ bool SignatureEngine::checkReady() const
* RESULT
* bReady - true if all conditions are satisfied, false otherwise
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -122,9 +120,6 @@ void SignatureEngine::tryToPerform( )
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -191,9 +186,6 @@ void SignatureEngine::clearUp( ) const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -266,3 +258,5 @@ cssu::Reference< com::sun::star::io::XInputStream > SAL_CALL SignatureEngine::ge
return xInputStream;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/signatureengine.hxx b/xmlsecurity/source/framework/signatureengine.hxx
index b36cd6aa6442..45a26637f73d 100644
--- a/xmlsecurity/source/framework/signatureengine.hxx
+++ b/xmlsecurity/source/framework/signatureengine.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
#include <com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp>
-#ifndef _COM_SUN_STAR_XML_CRYPTO_SAX_XSIGNATURECOLLECTOR_HPP_
#include <com/sun/star/xml/crypto/sax/XReferenceCollector.hpp>
-#endif
#include <com/sun/star/xml/crypto/sax/XKeyCollector.hpp>
#include <com/sun/star/xml/crypto/sax/XMissionTaker.hpp>
#include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.hpp>
@@ -64,9 +63,6 @@ class SignatureEngine : public cppu::ImplInheritanceHelper2
* FUNCTION
* Maintains common members and methods related with signature operation.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XReferenceCollector
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -142,3 +138,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx
index 535944ef8415..0ab14e4e16e5 100644
--- a/xmlsecurity/source/framework/signatureverifierimpl.cxx
+++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,9 +74,6 @@ bool SignatureVerifierImpl::checkReady() const
* RESULT
* bReady - true if all conditions are satisfied, false otherwise
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -103,9 +101,6 @@ void SignatureVerifierImpl::notifyResultListener() const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -139,9 +134,6 @@ void SignatureVerifierImpl::startEngine( const cssu::Reference<
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -240,3 +232,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL SignatureVerifierImpl::getSupportedServ
return SignatureVerifierImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/signatureverifierimpl.hxx b/xmlsecurity/source/framework/signatureverifierimpl.hxx
index 68b4fff245d2..3a40a6e901a1 100644
--- a/xmlsecurity/source/framework/signatureverifierimpl.hxx
+++ b/xmlsecurity/source/framework/signatureverifierimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,10 +54,6 @@ class SignatureVerifierImpl : public cppu::ImplInheritanceHelper3
* Collects all resources for a signature verification, then verifies the
* signature by invoking a xmlsec-based signature bridge component.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XSignatureVerifyResultBroadcaster,
- * XInitialization, XServiceInfo
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -133,3 +130,4 @@ SAL_CALL SignatureVerifierImpl_createInstance(
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx b/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx
index ec978dc488e1..56d69f2558d9 100644
--- a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx
+++ b/xmlsecurity/source/framework/xmlencryptiontemplateimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,12 +121,12 @@ Sequence< OUString > SAL_CALL XMLEncryptionTemplateImpl :: getSupportedServiceNa
Sequence< OUString > XMLEncryptionTemplateImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLEncryptionTemplate" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")) ;
return seqServiceNames ;
}
OUString XMLEncryptionTemplateImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.framework.XMLEncryptionTemplateImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.framework.XMLEncryptionTemplateImpl")) ;
}
//Helper for registry
@@ -140,3 +141,4 @@ Reference< XSingleServiceFactory > XMLEncryptionTemplateImpl :: impl_createFacto
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.hxx b/xmlsecurity/source/framework/xmlencryptiontemplateimpl.hxx
index af2f7ab93028..87aad120ff53 100644
--- a/xmlsecurity/source/framework/xmlencryptiontemplateimpl.hxx
+++ b/xmlsecurity/source/framework/xmlencryptiontemplateimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
@@ -111,3 +108,5 @@ class XMLEncryptionTemplateImpl : public ::cppu::WeakImplHelper3<
} ;
#endif // _XMLENCRYPTIONTEMPLATE_XMLSECIMPL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
index 6b50d7b017ed..46d5b6f84226 100644
--- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
+++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,12 +146,12 @@ Sequence< OUString > SAL_CALL XMLSignatureTemplateImpl :: getSupportedServiceNam
Sequence< OUString > XMLSignatureTemplateImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignatureTemplate" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")) ;
return seqServiceNames ;
}
OUString XMLSignatureTemplateImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.framework.XMLSignatureTemplateImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.framework.XMLSignatureTemplateImpl")) ;
}
//Helper for registry
@@ -165,3 +166,4 @@ Reference< XSingleServiceFactory > XMLSignatureTemplateImpl :: impl_createFactor
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.hxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.hxx
index c4e33fdfe972..544a25c9a197 100644
--- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.hxx
+++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,21 +35,15 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
-#ifndef __SGI_STL_VECTOR
#include <vector>
-#endif
class XMLSignatureTemplateImpl : public ::cppu::WeakImplHelper3<
::com::sun::star::xml::crypto::XXMLSignatureTemplate ,
@@ -123,3 +118,5 @@ class XMLSignatureTemplateImpl : public ::cppu::WeakImplHelper3<
} ;
#endif // _XMLSIGNATURETEMPLATE_XMLSECIMPL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/framework/xsec_framework.cxx b/xmlsecurity/source/framework/xsec_framework.cxx
index a9c418595901..289f6454a3c9 100644
--- a/xmlsecurity/source/framework/xsec_framework.cxx
+++ b/xmlsecurity/source/framework/xsec_framework.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -171,3 +172,4 @@ void * SAL_CALL component_getFactory(
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index d0fba345588c..2c33af2dc372 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,6 @@
#include "rtl/uri.hxx"
using namespace ::com::sun::star::uno;
-//using namespace ::com::sun::star;
namespace css = ::com::sun::star;
using rtl::OUString;
@@ -216,7 +216,7 @@ DocumentSignatureHelper::CreateElementList(
ImplFillElementList(aElements, rxStore, ::rtl::OUString(), false, mode);
// 2) Pictures...
- rtl::OUString aSubStorageName( rtl::OUString::createFromAscii( "Pictures" ) );
+ rtl::OUString aSubStorageName( RTL_CONSTASCII_USTRINGPARAM("Pictures") );
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -227,7 +227,7 @@ DocumentSignatureHelper::CreateElementList(
; // Doesn't have to exist...
}
// 3) OLE....
- aSubStorageName = rtl::OUString::createFromAscii( "ObjectReplacements" );
+ aSubStorageName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectReplacements"));
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -235,7 +235,7 @@ DocumentSignatureHelper::CreateElementList(
xSubStore.clear();
// Object folders...
- rtl::OUString aMatchStr( rtl::OUString::createFromAscii( "Object " ) );
+ rtl::OUString aMatchStr( RTL_CONSTASCII_USTRINGPARAM("Object ") );
Reference < css::container::XNameAccess > xElements( rxStore, UNO_QUERY );
Sequence< ::rtl::OUString > aElementNames = xElements->getElementNames();
sal_Int32 nElements = aElementNames.getLength();
@@ -264,7 +264,7 @@ DocumentSignatureHelper::CreateElementList(
case SignatureModeMacros:
{
// 1) Macros
- rtl::OUString aSubStorageName( rtl::OUString::createFromAscii( "Basic" ) );
+ rtl::OUString aSubStorageName( RTL_CONSTASCII_USTRINGPARAM("Basic") );
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -276,7 +276,7 @@ DocumentSignatureHelper::CreateElementList(
}
// 2) Dialogs
- aSubStorageName = rtl::OUString::createFromAscii( "Dialogs") ;
+ aSubStorageName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Dialogs")) ;
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -287,7 +287,7 @@ DocumentSignatureHelper::CreateElementList(
; // Doesn't have to exist...
}
// 3) Scripts
- aSubStorageName = rtl::OUString::createFromAscii( "Scripts") ;
+ aSubStorageName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Scripts")) ;
try
{
Reference < css::embed::XStorage > xSubStore = rxStore->openStorageElement( aSubStorageName, css::embed::ElementModes::READ );
@@ -430,7 +430,7 @@ bool DocumentSignatureHelper::equalsReferenceUriManifestPath(
retVal = true;
typedef std::vector<OUString>::const_iterator CIT;
for (CIT i = vUriSegments.begin(), j = vPathSegments.begin();
- i != vUriSegments.end(); i++, j++)
+ i != vUriSegments.end(); ++i, ++j)
{
//Decode the uri segment, so that %20 becomes ' ', etc.
OUString sDecUri = ::rtl::Uri::decode(
@@ -460,3 +460,5 @@ bool DocumentSignatureHelper::equalsReferenceUriManifestPath(
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "packagesignatures.xml" ) );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index d2def9648476..22a41bb3f4df 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,10 +50,6 @@
#include <tools/date.hxx>
#include <tools/time.hxx>
-//MM : search for the default profile
-//#include <unotools/streamhelper.hxx>
-//MM : end
-
/* SEInitializer component */
#define SEINITIALIZER_COMPONENT "com.sun.star.xml.crypto.SEInitializer"
@@ -90,7 +87,7 @@ bool XMLSignatureHelper::Init()
void XMLSignatureHelper::ImplCreateSEInitializer()
{
- rtl::OUString sSEInitializer(rtl::OUString::createFromAscii( SEINITIALIZER_COMPONENT ));
+ rtl::OUString sSEInitializer(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_COMPONENT ));
uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
mxSEInitializer = uno::Reference< com::sun::star::xml::crypto::XSEInitializer > (
xMCF->createInstanceWithContext( sSEInitializer, mxCtx ), uno::UNO_QUERY );
@@ -171,11 +168,6 @@ void XMLSignatureHelper::SetX509Certificate(
void XMLSignatureHelper::SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const Time& rTime )
{
- /*
- rtl::OUString aDate = String::CreateFromInt32( rDate.GetDate() );
- rtl::OUString aTime = String::CreateFromInt32( rTime.GetTime() );
- mpXSecController->setDateTime( nSecurityId, aDate, aTime );
- */
::com::sun::star::util::DateTime stDateTime;
stDateTime.HundredthSeconds = (::sal_uInt16)rTime.Get100Sec();
stDateTime.Seconds = (::sal_uInt16)rTime.GetSec();
@@ -201,8 +193,8 @@ uno::Reference<xml::sax::XDocumentHandler> XMLSignatureHelper::CreateDocumentHan
*/
uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
uno::Reference< io::XActiveDataSource > xSaxWriter(
- xMCF->createInstanceWithContext(rtl::OUString::createFromAscii(
- "com.sun.star.xml.sax.Writer"), mxCtx ), uno::UNO_QUERY );
+ xMCF->createInstanceWithContext(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.xml.sax.Writer")), mxCtx ), uno::UNO_QUERY );
DBG_ASSERT( xSaxWriter.is(), "can't instantiate XML writer" );
@@ -262,16 +254,10 @@ bool XMLSignatureHelper::CreateAndWriteSignature( const uno::Reference< xml::sax
/*
* create a signature listener
*/
-/*
- ImplXMLSignatureListener* pSignatureListener = new ImplXMLSignatureListener(
- LINK( this, XMLSignatureHelper, SignatureCreationResultListener ),
- LINK( this, XMLSignatureHelper, SignatureVerifyResultListener ),
- LINK( this, XMLSignatureHelper, StartVerifySignatureElement ) );
-*/
+
/*
* configure the signature creation listener
*/
- //mpXSecController->setSignatureCreationResultListener( pSignatureListener );
/*
* write signatures
@@ -284,7 +270,6 @@ bool XMLSignatureHelper::CreateAndWriteSignature( const uno::Reference< xml::sax
/*
* clear up the signature creation listener
*/
- //mpXSecController->setSignatureCreationResultListener( NULL );
return !mbError;
}
@@ -311,7 +296,6 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const com::sun::star::uno::Refe
* prepare ParserInputSrouce
*/
xml::sax::InputSource aParserInput;
- // aParserInput.sSystemId = ouName;
aParserInput.aInputStream = xInputStream;
/*
@@ -320,7 +304,7 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const com::sun::star::uno::Refe
uno::Reference< lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
uno::Reference< xml::sax::XParser > xParser(
xMCF->createInstanceWithContext(
- rtl::OUString::createFromAscii("com.sun.star.xml.sax.Parser"), mxCtx ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ), mxCtx ),
uno::UNO_QUERY );
DBG_ASSERT( xParser.is(), "Can't create parser" );
@@ -342,7 +326,6 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const com::sun::star::uno::Refe
/*
* configure the signature verify listener
*/
- //mpXSecController->setSignatureVerifyResultListener( pSignatureListener );
/*
* setup the connection:
@@ -383,7 +366,6 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const com::sun::star::uno::Refe
/*
* clear up the signature verify listener
*/
- //mpXSecController->setSignatureVerifyResultListener( NULL );
/*
* release the signature reader
@@ -444,3 +426,5 @@ IMPL_LINK( XMLSignatureHelper, StartVerifySignatureElement, const uno::Reference
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
index 83988e872b49..fed623cb22b1 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -231,3 +232,4 @@ uno::Reference < io::XInputStream > UriBindingHelper::OpenInputStream( const uno
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
index 84b45d02ba41..e5dd47978b94 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,3 +133,4 @@ public:
static com::sun::star::uno::Reference < com::sun::star::io::XInputStream > OpenInputStream( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rxStore, const rtl::OUString& rURI );
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index bdcb0658af1e..9b888932b746 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -296,9 +297,6 @@ int XSecController::findSignatureInfor( sal_Int32 nSecurityId) const
* index - the index of the signature, or -1 when no such signature
* existing
*
- * HISTORY
- * 08.05.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -339,17 +337,14 @@ void XSecController::createXSecComponent( )
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
******************************************************************************/
{
- rtl::OUString sSAXEventKeeper(rtl::OUString::createFromAscii( SAXEVENTKEEPER_COMPONENT ));
- rtl::OUString sXMLSignature(rtl::OUString::createFromAscii( XMLSIGNATURE_COMPONENT ));
- rtl::OUString sXMLDocument(rtl::OUString::createFromAscii( XMLDOCUMENTWRAPPER_COMPONENT ));
+ rtl::OUString sSAXEventKeeper(RTL_CONSTASCII_USTRINGPARAM( SAXEVENTKEEPER_COMPONENT ));
+ rtl::OUString sXMLSignature(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_COMPONENT ));
+ rtl::OUString sXMLDocument(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENTWRAPPER_COMPONENT ));
/*
* marks all security components are not available.
@@ -448,9 +443,6 @@ bool XSecController::chainOn( bool bRetrievingLastEvent )
* events except that startElement event, then adds a new
* ElementCollector, then receives that startElement event.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -548,9 +540,6 @@ void XSecController::chainOff()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -616,9 +605,6 @@ void XSecController::checkChainingStatus()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -655,9 +641,6 @@ void XSecController::initializeSAXChain()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -697,9 +680,6 @@ cssu::Reference< com::sun::star::io::XInputStream >
* RESULT
* xInputStream - the XInputStream interface
*
- * HISTORY
- * 15.04.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -714,57 +694,6 @@ cssu::Reference< com::sun::star::io::XInputStream >
return xObjectInputStream;
}
-#if 0
-sal_Int32 XSecController::getFastPropertyIndex(sal_Int32 nHandle) const
-/****** XSecController/getFastPropertyIndex ***********************************
- *
- * NAME
- * getFastPropertyIndex -- gets the index of a particular fast property
- *
- * SYNOPSIS
- * nIndex = getFastPropertyIndex( nHandle );
- *
- * FUNCTION
- * See NAME.
- *
- * INPUTS
- * nHandle - the key for the fast property
- *
- * RESULT
- * nIndex - the index of the fast property, or -1
- * if the key is not found.
- *
- * HISTORY
- * 05.01.2004 - implemented
- *
- * AUTHOR
- * Michael Mi
- * Email: michael.mi@sun.com
- ******************************************************************************/
-{
- std::vector< sal_Int32 >::const_iterator ii = m_vFastPropertyIndexs.begin();
- sal_Int32 nIndex = 0;
-
- bool bFound = false;
-
- for( ; ii != m_vFastPropertyIndexs.end(); ++ii,++nIndex )
- {
- if ( nHandle == (*ii))
- {
- bFound = true;
- break;
- }
- }
-
- if (!bFound)
- {
- nIndex = -1;
- }
-
- return nIndex;
-}
-#endif
-
/*
* public methods
*/
@@ -799,9 +728,6 @@ void XSecController::startMission(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -845,9 +771,6 @@ void XSecController::setSAXChainConnector(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -886,9 +809,6 @@ void XSecController::setSAXChainConnector(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -920,9 +840,6 @@ void XSecController::clearSAXChainConnector()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -965,9 +882,6 @@ void XSecController::endMission()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1026,9 +940,6 @@ const char* XSecController::getErrorMessage()
* RESULT
* empty
*
- * HISTORY
- * 22.04.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1058,9 +969,6 @@ void XSecController::exportSignature(
* RESULT
* empty
*
- * HISTORY
- * 26.05.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1090,11 +998,6 @@ void XSecController::exportSignature(
rtl::OUString tag_SignatureProperties(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNATUREPROPERTIES));
rtl::OUString tag_SignatureProperty(RTL_CONSTASCII_USTRINGPARAM(TAG_SIGNATUREPROPERTY));
rtl::OUString tag_Date(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE));
-#if 0
- rtl::OUString tag_Timestamp(RTL_CONSTASCII_USTRINGPARAM(TAG_TIMESTAMP));
- rtl::OUString tag_Date(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE));
- rtl::OUString tag_Time(RTL_CONSTASCII_USTRINGPARAM(TAG_TIME));
-#endif
const SignatureReferenceInformations& vReferenceInfors = signatureInfo.vSignatureReferenceInfors;
SvXMLAttributeList *pAttributeList;
@@ -1364,46 +1267,6 @@ SignatureInformations XSecController::getSignatureInformations() const
/*
* XFastPropertySet
*/
-/*
-void SAL_CALL XSecController::setFastPropertyValue(
- sal_Int32 nHandle,
- const cssu::Any& aValue )
- throw ( cssb::UnknownPropertyException,
- cssb::PropertyVetoException,
- cssl::IllegalArgumentException,
- cssl::WrappedTargetException,
- cssu::RuntimeException)
-{
- sal_Int32 nIndex = getFastPropertyIndex(nHandle);
- if (nIndex == -1)
- {
- m_vFastPropertyIndexs.push_back( nHandle );
- m_vFastPropertyValues.push_back( aValue );
- }
- else
- {
- m_vFastPropertyValues[nIndex] = aValue;
- }
-}
-
-cssu::Any SAL_CALL XSecController::getFastPropertyValue(
- sal_Int32 nHandle )
- throw (
- cssb::UnknownPropertyException,
- cssl::WrappedTargetException,
- cssu::RuntimeException)
-{
- cssu::Any aValue;
-
- sal_Int32 nIndex = getFastPropertyIndex(nHandle);
- if (nIndex != -1)
- {
- aValue = m_vFastPropertyValues[nIndex];
- }
-
- return aValue;
-}
-*/
/*
* XSAXEventKeeperStatusChangeListener
@@ -1412,13 +1275,6 @@ cssu::Any SAL_CALL XSecController::getFastPropertyValue(
void SAL_CALL XSecController::blockingStatusChanged( sal_Bool isBlocking )
throw (cssu::RuntimeException)
{
- /*
- showMessageBox( rtl::OUString::createFromAscii((isBlocking?
- "Blocking Status => TRUE":
- "Blocking Status => FALSE")),
- rtl::OUString::createFromAscii("SAXEventKeeper Status"));
- */
-
this->m_bIsBlocking = isBlocking;
checkChainingStatus();
}
@@ -1427,13 +1283,6 @@ void SAL_CALL XSecController::collectionStatusChanged(
sal_Bool isInsideCollectedElement )
throw (cssu::RuntimeException)
{
- /*
- showMessageBox( rtl::OUString::createFromAscii((isInsideCollectedElement?
- "Collection Status => TRUE":
- "Collection Status => FALSE")),
- rtl::OUString::createFromAscii("SAXEventKeeper Status"));
- */
-
this->m_bIsCollectingElement = isInsideCollectedElement;
checkChainingStatus();
}
@@ -1441,12 +1290,7 @@ void SAL_CALL XSecController::collectionStatusChanged(
void SAL_CALL XSecController::bufferStatusChanged( sal_Bool /*isBufferEmpty*/)
throw (cssu::RuntimeException)
{
- /*
- showMessageBox( rtl::OUString::createFromAscii((isBufferEmpty?
- "Buffer Empty => TRUE":
- "Buffer Empty => FALSE")),
- rtl::OUString::createFromAscii("SAXEventKeeper Status"));
- */
+
}
/*
@@ -1460,16 +1304,6 @@ void SAL_CALL XSecController::signatureCreated( sal_Int32 securityId, com::sun::
SignatureInformation& signatureInfor = m_vInternalSignatureInformations[index].signatureInfor;
- /*
- if (nResult == cssxc::sax::SignatureCreationResult_CREATIONSUCCEED)
- {
- signatureInfor.nStatus = STATUS_CREATION_SUCCEED;
- }
- else
- {
- signatureInfor.nStatus = STATUS_CREATION_FAIL;
- }
- */
signatureInfor.nStatus = nResult;
}
@@ -1484,15 +1318,7 @@ void SAL_CALL XSecController::signatureVerified( sal_Int32 securityId, com::sun:
SignatureInformation& signatureInfor = m_vInternalSignatureInformations[index].signatureInfor;
- /*
- if (nResult == cssxc::sax::SignatureVerifyResult_VERIFYSUCCEED)
- {
- signatureInfor.nStatus = STATUS_VERIFY_SUCCEED;
- }
- else
- {
- signatureInfor.nStatus = STATUS_VERIFY_FAIL;
- }
- */
signatureInfor.nStatus = nResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/source/helper/xsecctl.hxx
index 4a715105d044..37ab6d328fdf 100644
--- a/xmlsecurity/source/helper/xsecctl.hxx
+++ b/xmlsecurity/source/helper/xsecctl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -171,12 +172,6 @@ class XSecController : public cppu::WeakImplHelper4
* Controlls the whole xml security framework to create signatures or to
* verify signatures.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XSecurityController,
- * XFastPropertySet, XSAXEventKeeperStatusChangeListener,
- * XSignatureCreationResultListener,
- * XSignatureVerifyResultListener
- *
* NOTES
* The XFastPropertySet interface is used to transfer common values to
* classes in other module, for instance, the signature id for all
@@ -216,19 +211,6 @@ private:
com::sun::star::uno::Reference<
com::sun::star::xml::crypto::XXMLSecurityContext > m_xSecurityContext;
-#if 0
- /*
- * the signature creation result listener
- */
- com::sun::star::uno::Reference<
- com::sun::star::xml::crypto::sax::XSignatureCreationResultListener > m_xSignatureCreationResultListener;
- /*
- * the signature verify result listener
- */
- com::sun::star::uno::Reference<
- com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener > m_xSignatureVerifyResultListener;
-#endif
-
/*
* the security id incrementer, in order to make any security id unique
* to the SAXEventKeeper.
@@ -531,23 +513,6 @@ public:
/*
* XFastPropertySet
*/
- /*
- virtual void SAL_CALL setFastPropertyValue(
- sal_Int32 nHandle,
- const com::sun::star::uno::Any& aValue )
- throw (
- com::sun::star::beans::UnknownPropertyException,
- com::sun::star::beans::PropertyVetoException,
- com::sun::star::lang::IllegalArgumentException,
- com::sun::star::lang::WrappedTargetException,
- com::sun::star::uno::RuntimeException);
- virtual com::sun::star::uno::Any SAL_CALL getFastPropertyValue(
- sal_Int32 nHandle )
- throw (
- com::sun::star::beans::UnknownPropertyException,
- com::sun::star::lang::WrappedTargetException,
- com::sun::star::uno::RuntimeException);
- */
/*
* XSAXEventKeeperStatusChangeListener
@@ -575,3 +540,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index 1546acbdb4ef..96272fd07416 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,7 +75,6 @@ void SAL_CALL XSecParser::startDocument( )
m_bInSignatureValue = false;
m_bInDigestValue = false;
m_bInDate = false;
- //m_bInTime = false;
if (m_xNextHandler.is())
{
@@ -151,27 +151,27 @@ void SAL_CALL XSecParser::startElement(
}
else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509ISSUERNAME)))
{
- m_ouX509IssuerName = rtl::OUString::createFromAscii("");
+ m_ouX509IssuerName = rtl::OUString();
m_bInX509IssuerName = true;
}
else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509SERIALNUMBER)))
{
- m_ouX509SerialNumber = rtl::OUString::createFromAscii("");
+ m_ouX509SerialNumber = rtl::OUString();
m_bInX509SerialNumber = true;
}
else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_X509CERTIFICATE)))
{
- m_ouX509Certificate = rtl::OUString::createFromAscii("");
+ m_ouX509Certificate = rtl::OUString();
m_bInX509Certificate = true;
}
else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREVALUE)))
{
- m_ouSignatureValue = rtl::OUString::createFromAscii("");
+ m_ouSignatureValue = rtl::OUString();
m_bInSignatureValue = true;
}
else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_DIGESTVALUE)))
{
- m_ouDigestValue = rtl::OUString::createFromAscii("");
+ m_ouDigestValue = rtl::OUString();
m_bInDigestValue = true;
}
else if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_SIGNATUREPROPERTY)) )
@@ -185,16 +185,9 @@ void SAL_CALL XSecParser::startElement(
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":"))
+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TAG_DATE)))
{
- m_ouDate = rtl::OUString::createFromAscii("");
+ m_ouDate = rtl::OUString();
m_bInDate = true;
}
- /*
- else if (aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_TIME)))
- {
- m_ouTime = rtl::OUString::createFromAscii("");
- m_bInTime = true;
- }
- */
if (m_xNextHandler.is())
{
@@ -270,13 +263,6 @@ void SAL_CALL XSecParser::endElement( const rtl::OUString& aName )
m_pXSecController->setDate( m_ouDate );
m_bInDate = false;
}
- /*
- else if ( aName == rtl::OUString(RTL_ASCII_USTRINGPARAM(TAG_TIME)) )
- {
- m_pXSecController->setTime( m_ouTime );
- m_bInTime = false;
- }
- */
if (m_xNextHandler.is())
{
@@ -326,12 +312,6 @@ void SAL_CALL XSecParser::characters( const rtl::OUString& aChars )
{
m_ouDate += aChars;
}
- /*
- else if (m_bInTime)
- {
- m_ouTime += aChars;
- }
- */
if (m_xNextHandler.is())
{
@@ -375,3 +355,5 @@ void SAL_CALL XSecParser::initialize(
{
aArguments[0] >>= m_xNextHandler;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
index 8de771569191..6530fa1d4207 100644
--- a/xmlsecurity/source/helper/xsecparser.hxx
+++ b/xmlsecurity/source/helper/xsecparser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,9 +53,6 @@ class XSecParser: public cppu::WeakImplHelper2
* security elements in the SAX event stream, then notifies
* the XSecController.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XDocumentHandler, XInitialization
- *
* NOTES
* This class is used when importing a document.
*
@@ -75,7 +73,6 @@ private:
rtl::OUString m_ouDigestValue;
rtl::OUString m_ouSignatureValue;
rtl::OUString m_ouDate;
- //rtl::OUString m_ouTime;
/*
* whether inside a particular element
@@ -86,7 +83,6 @@ private:
bool m_bInDigestValue;
bool m_bInSignatureValue;
bool m_bInDate;
- //bool m_bInTime;
/*
* the XSecController collaborating with XSecParser
@@ -163,3 +159,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index 774a07cb28f2..d64f1adc1623 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,7 +87,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
xMCF->createInstanceWithContext(
- rtl::OUString::createFromAscii(SIGNATURECREATOR_COMPONENT), mxCtx),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SIGNATURECREATOR_COMPONENT)), mxCtx),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
@@ -372,3 +373,4 @@ bool XSecController::WriteSignature(
return rc;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 82210fdc91b3..7fb4540f06fd 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,7 +71,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
xReferenceResolvedListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
xMCF->createInstanceWithContext(
- rtl::OUString::createFromAscii( SIGNATUREVERIFIER_COMPONENT ), mxCtx),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATUREVERIFIER_COMPONENT )), mxCtx),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
@@ -219,14 +220,6 @@ void XSecController::setDate( rtl::OUString& ouDate )
isi.signatureInfor.ouDateTime = ouDate;
}
-/*
-void XSecController::setTime( rtl::OUString& ouTime )
-{
- InternalSignatureInformation &isi = m_vInternalSignatureInformations[m_vInternalSignatureInformations.size()-1];
- isi.signatureInfor.ouTime = ouTime;
-}
-*/
-
void XSecController::setId( rtl::OUString& ouId )
{
InternalSignatureInformation &isi = m_vInternalSignatureInformations[m_vInternalSignatureInformations.size()-1];
@@ -329,3 +322,4 @@ void XSecController::releaseSignatureReader()
m_pXSecParser = NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/biginteger.cxx b/xmlsecurity/source/xmlsec/biginteger.cxx
index e3947671ae38..100708938cdb 100644
--- a/xmlsecurity/source/xmlsec/biginteger.cxx
+++ b/xmlsecurity/source/xmlsec/biginteger.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,3 +125,4 @@ OUString bigIntegerToNumericString ( Sequence< sal_Int8 > integer )
return aRet ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx
index 19dfeb9c08a7..c7e3c0fa61be 100644
--- a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,4 @@ void CertificateExtension_XmlSecImpl :: setCertExtn( unsigned char* value, unsig
m_critical = critical ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx
index 26d5e413307c..bbfecbbcd760 100644
--- a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx
+++ b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,4 @@ class CertificateExtension_XmlSecImpl : public ::cppu::WeakImplHelper1<
#endif // _CERTIFICATEEXTENSION_XMLSECIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/certvalidity.cxx b/xmlsecurity/source/xmlsec/certvalidity.cxx
index b92fe3b1214e..e53863d1dd01 100644
--- a/xmlsecurity/source/xmlsec/certvalidity.cxx
+++ b/xmlsecurity/source/xmlsec/certvalidity.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,43 +57,44 @@ rtl::OUString certificateValidityToOUString( ::sal_Int32 certValidity ) {
OUString aValidity ;
if( (certValidity & CertificateValidity::VALID) == CertificateValidity::VALID ) {
- aValidity = OUString::createFromAscii( ( const char* )VALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(VALID_STR )) ;
} else if( ( certValidity & CertificateValidity::INVALID ) == CertificateValidity::INVALID ) {
- aValidity = OUString::createFromAscii( ( const char* )INVALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(INVALID_STR )) ;
} else if( ( certValidity & CertificateValidity::UNTRUSTED ) == CertificateValidity::UNTRUSTED ) {
- aValidity = OUString::createFromAscii( ( const char* )UNTRUSTED_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(UNTRUSTED_STR )) ;
} else if( ( certValidity & CertificateValidity::TIME_INVALID ) == CertificateValidity::TIME_INVALID ) {
- aValidity = OUString::createFromAscii( ( const char* )TIME_INVALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(TIME_INVALID_STR )) ;
} else if( ( certValidity & CertificateValidity::NOT_TIME_NESTED ) == CertificateValidity::NOT_TIME_NESTED ) {
- aValidity = OUString::createFromAscii( ( const char* )NOT_NESTED_TIME_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(NOT_NESTED_TIME_STR )) ;
} else if( ( certValidity & CertificateValidity::REVOKED ) == CertificateValidity::REVOKED ) {
- aValidity = OUString::createFromAscii( ( const char* )REVOKED_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(REVOKED_STR )) ;
} else if( ( certValidity & CertificateValidity::UNKNOWN_REVOKATION ) == CertificateValidity::UNKNOWN_REVOKATION ) {
- aValidity = OUString::createFromAscii( ( const char* )UNKNOWN_REVOKATION_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(UNKNOWN_REVOKATION_STR )) ;
} else if( ( certValidity & CertificateValidity::SIGNATURE_INVALID ) == CertificateValidity::SIGNATURE_INVALID ) {
- aValidity = OUString::createFromAscii( ( const char* )SIGNATURE_INVALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(SIGNATURE_INVALID_STR )) ;
} else if( ( certValidity & CertificateValidity::EXTENSION_INVALID ) == CertificateValidity::EXTENSION_INVALID ) {
- aValidity = OUString::createFromAscii( ( const char* )EXTENSION_INVALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(EXTENSION_INVALID_STR )) ;
} else if( ( certValidity & CertificateValidity::EXTENSION_UNKNOWN ) == CertificateValidity::EXTENSION_UNKNOWN ) {
- aValidity = OUString::createFromAscii( ( const char* )EXTENSION_UNKNOWN_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(EXTENSION_UNKNOWN_STR )) ;
} else if( ( certValidity & CertificateValidity::ISSUER_UNKNOWN ) == CertificateValidity::ISSUER_UNKNOWN ) {
- aValidity = OUString::createFromAscii( ( const char* )ISSUER_UNKNOWN_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_UNKNOWN_STR )) ;
} else if( ( certValidity & CertificateValidity::ISSUER_UNTRUSTED ) == CertificateValidity::ISSUER_UNTRUSTED ) {
- aValidity = OUString::createFromAscii( ( const char* )ISSUER_UNTRUSTED_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_UNTRUSTED_STR )) ;
} else if( ( certValidity & CertificateValidity::ISSUER_INVALID ) == CertificateValidity::ISSUER_INVALID ) {
- aValidity = OUString::createFromAscii( ( const char* )ISSUER_INVALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ISSUER_INVALID_STR )) ;
} else if( ( certValidity & CertificateValidity::ROOT_UNKNOWN ) == CertificateValidity::ROOT_UNKNOWN ) {
- aValidity = OUString::createFromAscii( ( const char* )ROOT_UNKNOWN_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_UNKNOWN_STR )) ;
} else if( ( certValidity & CertificateValidity::ROOT_UNTRUSTED ) == CertificateValidity::ROOT_UNTRUSTED ) {
- aValidity = OUString::createFromAscii( ( const char* )ROOT_UNTRUSTED_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_UNTRUSTED_STR )) ;
} else if( ( certValidity & CertificateValidity::ROOT_INVALID ) == CertificateValidity::ROOT_INVALID ) {
- aValidity = OUString::createFromAscii( ( const char* )ROOT_INVALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(ROOT_INVALID_STR )) ;
} else if( ( certValidity & CertificateValidity::CHAIN_INCOMPLETE ) == CertificateValidity::CHAIN_INCOMPLETE ) {
- aValidity = OUString::createFromAscii( ( const char* )CHAIN_INCOMPLETE_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(CHAIN_INCOMPLETE_STR )) ;
} else {
- aValidity = OUString::createFromAscii( ( const char* )INVALID_STR ) ;
+ aValidity = OUString(RTL_CONSTASCII_USTRINGPARAM(INVALID_STR )) ;
}
return aValidity ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/diagnose.cxx b/xmlsecurity/source/xmlsec/diagnose.cxx
index 4c10d2f7d576..05bf0275f3d1 100644
--- a/xmlsecurity/source/xmlsec/diagnose.cxx
+++ b/xmlsecurity/source/xmlsec/diagnose.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: xmlstreamio.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -75,3 +73,5 @@ void xmlsec_trace(const char* pszFormat, ...)
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/diagnose.hxx b/xmlsecurity/source/xmlsec/diagnose.hxx
index 691d4e277c20..33bd9cb8a6a4 100644
--- a/xmlsecurity/source/xmlsec/diagnose.hxx
+++ b/xmlsecurity/source/xmlsec/diagnose.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: xmlstreamio.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,3 +39,5 @@ namespace xmlsecurity
#endif //XMLSECURITY_DIAGNOSE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/errorcallback.cxx b/xmlsecurity/source/xmlsec/errorcallback.cxx
index 2c55bf1a4fad..6a1558108b61 100644
--- a/xmlsecurity/source/xmlsec/errorcallback.cxx
+++ b/xmlsecurity/source/xmlsec/errorcallback.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,112 +44,6 @@
using namespace ::com::sun::star::xml::crypto;
-// ::com::sun::star::uno::Reference< XXMLSecurityTemplate > g_xErrorRecorder;
-// bool g_bErrorRecorded;
-
-// SecurityOperationStatus getOperationStatus(int reason)
-// {
-// switch (reason)
-// {
-// case XMLSEC_ERRORS_R_XMLSEC_FAILED:
-// return SecurityOperationStatus_ENGINE_FAILED;
-// case XMLSEC_ERRORS_R_MALLOC_FAILED:
-// return SecurityOperationStatus_MALLOC_FAILED;
-// case XMLSEC_ERRORS_R_STRDUP_FAILED:
-// return SecurityOperationStatus_STRDUP_FAILED;
-// case XMLSEC_ERRORS_R_CRYPTO_FAILED:
-// return SecurityOperationStatus_CRYPTO_FAILED;
-// case XMLSEC_ERRORS_R_XML_FAILED:
-// return SecurityOperationStatus_XML_FAILED;
-// case XMLSEC_ERRORS_R_XSLT_FAILED:
-// return SecurityOperationStatus_XSLT_FAILED;
-// case XMLSEC_ERRORS_R_IO_FAILED:
-// return SecurityOperationStatus_IO_FAILED;
-// case XMLSEC_ERRORS_R_DISABLED:
-// return SecurityOperationStatus_DISABLED;
-// case XMLSEC_ERRORS_R_NOT_IMPLEMENTED:
-// return SecurityOperationStatus_NOT_IMPLEMENTED;
-// case XMLSEC_ERRORS_R_INVALID_SIZE:
-// return SecurityOperationStatus_INVALID_SIZE;
-// case XMLSEC_ERRORS_R_INVALID_DATA:
-// return SecurityOperationStatus_INVALID_DATA;
-// case XMLSEC_ERRORS_R_INVALID_RESULT:
-// return SecurityOperationStatus_INVALID_RESULT;
-// case XMLSEC_ERRORS_R_INVALID_TYPE:
-// return SecurityOperationStatus_INVALID_TYPE;
-// case XMLSEC_ERRORS_R_INVALID_OPERATION:
-// return SecurityOperationStatus_INVALID_OPERATION;
-// case XMLSEC_ERRORS_R_INVALID_STATUS:
-// return SecurityOperationStatus_INVALID_STATUS;
-// case XMLSEC_ERRORS_R_INVALID_FORMAT:
-// return SecurityOperationStatus_INVALID_FORMAT;
-// case XMLSEC_ERRORS_R_DATA_NOT_MATCH:
-// return SecurityOperationStatus_DATA_NOT_MATCH;
-// case XMLSEC_ERRORS_R_INVALID_NODE:
-// return SecurityOperationStatus_INVALID_NODE;
-// case XMLSEC_ERRORS_R_INVALID_NODE_CONTENT:
-// return SecurityOperationStatus_INVALID_NODE_CONTENT;
-// case XMLSEC_ERRORS_R_INVALID_NODE_ATTRIBUTE:
-// return SecurityOperationStatus_INVALID_NODE_ATTRIBUTE;
-// case XMLSEC_ERRORS_R_MISSING_NODE_ATTRIBUTE:
-// return SecurityOperationStatus_MISSING_NODE_ATTRIBUTE;
-// case XMLSEC_ERRORS_R_NODE_ALREADY_PRESENT:
-// return SecurityOperationStatus_NODE_ALREADY_PRESENT;
-// case XMLSEC_ERRORS_R_UNEXPECTED_NODE:
-// return SecurityOperationStatus_UNEXPECTED_NODE;
-// case XMLSEC_ERRORS_R_NODE_NOT_FOUND:
-// return SecurityOperationStatus_NODE_NOT_FOUND;
-// case XMLSEC_ERRORS_R_INVALID_TRANSFORM:
-// return SecurityOperationStatus_INVALID_TRANSFORM;
-// case XMLSEC_ERRORS_R_INVALID_TRANSFORM_KEY:
-// return SecurityOperationStatus_INVALID_TRANSFORM_KEY;
-// case XMLSEC_ERRORS_R_INVALID_URI_TYPE:
-// return SecurityOperationStatus_INVALID_URI_TYPE;
-// case XMLSEC_ERRORS_R_TRANSFORM_SAME_DOCUMENT_REQUIRED:
-// return SecurityOperationStatus_TRANSFORM_SAME_DOCUMENT_REQUIRED;
-// case XMLSEC_ERRORS_R_TRANSFORM_DISABLED:
-// return SecurityOperationStatus_TRANSFORM_DISABLED;
-// case XMLSEC_ERRORS_R_INVALID_KEY_DATA:
-// return SecurityOperationStatus_INVALID_KEY_DATA;
-// case XMLSEC_ERRORS_R_KEY_DATA_NOT_FOUND:
-// return SecurityOperationStatus_KEY_DATA_NOT_FOUND;
-// case XMLSEC_ERRORS_R_KEY_DATA_ALREADY_EXIST:
-// return SecurityOperationStatus_KEY_DATA_ALREADY_EXIST;
-// case XMLSEC_ERRORS_R_INVALID_KEY_DATA_SIZE:
-// return SecurityOperationStatus_INVALID_KEY_DATA_SIZE;
-// case XMLSEC_ERRORS_R_KEY_NOT_FOUND:
-// return SecurityOperationStatus_KEY_NOT_FOUND;
-// case XMLSEC_ERRORS_R_KEYDATA_DISABLED:
-// return SecurityOperationStatus_KEYDATA_DISABLED;
-// case XMLSEC_ERRORS_R_MAX_RETRIEVALS_LEVEL:
-// return SecurityOperationStatus_MAX_RETRIEVALS_LEVEL;
-// case XMLSEC_ERRORS_R_MAX_RETRIEVAL_TYPE_MISMATCH:
-// return SecurityOperationStatus_MAX_RETRIEVAL_TYPE_MISMATCH;
-// case XMLSEC_ERRORS_R_MAX_ENCKEY_LEVEL:
-// return SecurityOperationStatus_MAX_ENCKEY_LEVEL;
-// case XMLSEC_ERRORS_R_CERT_VERIFY_FAILED:
-// return SecurityOperationStatus_CERT_VERIFY_FAILED;
-// case XMLSEC_ERRORS_R_CERT_NOT_FOUND:
-// return SecurityOperationStatus_CERT_NOT_FOUND;
-// case XMLSEC_ERRORS_R_CERT_REVOKED:
-// return SecurityOperationStatus_CERT_REVOKED;
-// case XMLSEC_ERRORS_R_CERT_ISSUER_FAILED:
-// return SecurityOperationStatus_CERT_ISSUER_FAILED;
-// case XMLSEC_ERRORS_R_CERT_NOT_YET_VALID:
-// return SecurityOperationStatus_CERT_NOT_YET_VALID;
-// case XMLSEC_ERRORS_R_CERT_HAS_EXPIRED:
-// return SecurityOperationStatus_CERT_HAS_EXPIRED;
-// case XMLSEC_ERRORS_R_DSIG_NO_REFERENCES:
-// return SecurityOperationStatus_DSIG_NO_REFERENCES;
-// case XMLSEC_ERRORS_R_DSIG_INVALID_REFERENCE:
-// return SecurityOperationStatus_DSIG_INVALID_REFERENCE;
-// case XMLSEC_ERRORS_R_ASSERTION:
-// return SecurityOperationStatus_ASSERTION;
-// default:
-// return SecurityOperationStatus_RUNTIMEERROR_FAILED;
-// }
-// }
-
extern "C"
void errorCallback(const char * /*file*/,
@@ -166,46 +61,16 @@ void errorCallback(const char * /*file*/,
// const char * amsg = msg ? msg : "";
// fprintf(stdout, "xmlsec error: %s, %s, %s, %i %s \n", afunc, errObj, errSub, reason, amsg);
#endif
- //ToDo write log message
-// if (g_xErrorRecorder.is() && !g_bErrorRecorded)
-// {
-// g_xErrorRecorder->setStatus(getOperationStatus(reason));
-
-// if ( reason != XMLSEC_ERRORS_R_ASSERTION && reason!=XMLSEC_ERRORS_R_XMLSEC_FAILED)
-// {
-// g_bErrorRecorded = true;
-// }
-// }
}
-// void setErrorRecorder(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSecurityTemplate >& xTemplate)
-// {
-// g_xErrorRecorder = xTemplate;
-// g_xErrorRecorder->setStatus(SecurityOperationStatus_OPERATION_SUCCEEDED);
-// g_bErrorRecorded = false;
-// xmlSecErrorsSetCallback(errorCallback);
-// }
-
-//void setErrorRecorder(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSignatureTemplate >& xTemplate)
-
void setErrorRecorder()
{
-// ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSecurityTemplate >
-// xSecurityTemplate(xTemplate, ::com::sun::star::uno::UNO_QUERY);
-// setErrorRecorder( xSecurityTemplate );
xmlSecErrorsSetCallback(errorCallback);
}
-// void setErrorRecorder(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLEncryptionTemplate >& xTemplate)
-// {
-// ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSecurityTemplate >
-// xSecurityTemplate(xTemplate, ::com::sun::star::uno::UNO_QUERY);
-// setErrorRecorder( xSecurityTemplate );
-// }
-
void clearErrorRecorder()
{
xmlSecErrorsSetCallback(NULL);
-// g_xErrorRecorder = NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/errorcallback.hxx b/xmlsecurity/source/xmlsec/errorcallback.hxx
index 8c219a5396fd..c861263a0f22 100644
--- a/xmlsecurity/source/xmlsec/errorcallback.hxx
+++ b/xmlsecurity/source/xmlsec/errorcallback.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _ERRORCALLBACK_XMLSECIMPL_HXX_
#define _ERRORCALLBACK_XMLSECIMPL_HXX_
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
@@ -42,3 +41,4 @@ void clearErrorRecorder();
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/oid.hxx b/xmlsecurity/source/xmlsec/mscrypt/oid.hxx
index 05447254175c..c46456d4dc87 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/oid.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/oid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,3 +157,5 @@ OIDItem OIDs[] = {
int nOID = 115;
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index d4bc76e627b5..94017fe97286 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,12 +38,11 @@
#pragma warning(pop)
#endif
#include <sal/config.h>
+#include <sal/macros.h>
#include <osl/thread.h>
#include "securityenvironment_mscryptimpl.hxx"
-#ifndef _X509CERTIFICATE_NSSIMPL_HXX_
#include "x509certificate_mscryptimpl.hxx"
-#endif
#include <rtl/uuid.h>
#include <xmlsec/xmlsec.h>
@@ -55,12 +55,10 @@
#include "xmlsec/keysmngr.h"
#include "xmlsec/mscrypto/akmngr.h"
-//CP : added by CP
#include <rtl/locale.h>
#include <osl/nlsupport.h>
#include <osl/process.h>
-//CP : end
#include <rtl/memory.h>
#include "../diagnose.hxx"
@@ -115,11 +113,10 @@ CertErrorToString arErrStrings[] =
void traceTrustStatus(DWORD err)
{
- int numErrors = sizeof(arErrStrings) / sizeof(CertErrorToString);
xmlsec_trace("The certificate error status is: ");
if (err == 0)
xmlsec_trace("%s", arErrStrings[0].name);
- for (int i = 1; i < numErrors; i++)
+ for (int i = 1; i < SAL_N_ELEMENTS(arErrStrings); i++)
{
if (arErrStrings[i].error & err)
xmlsec_trace("%s", arErrStrings[i].name);
@@ -155,21 +152,21 @@ SecurityEnvironment_MSCryptImpl :: ~SecurityEnvironment_MSCryptImpl() {
if( !m_tSymKeyList.empty() ) {
std::list< HCRYPTKEY >::iterator symKeyIt ;
- for( symKeyIt = m_tSymKeyList.begin() ; symKeyIt != m_tSymKeyList.end() ; symKeyIt ++ )
+ for( symKeyIt = m_tSymKeyList.begin() ; symKeyIt != m_tSymKeyList.end() ; ++symKeyIt )
CryptDestroyKey( *symKeyIt ) ;
}
if( !m_tPubKeyList.empty() ) {
std::list< HCRYPTKEY >::iterator pubKeyIt ;
- for( pubKeyIt = m_tPubKeyList.begin() ; pubKeyIt != m_tPubKeyList.end() ; pubKeyIt ++ )
+ for( pubKeyIt = m_tPubKeyList.begin() ; pubKeyIt != m_tPubKeyList.end() ; ++pubKeyIt )
CryptDestroyKey( *pubKeyIt ) ;
}
if( !m_tPriKeyList.empty() ) {
std::list< HCRYPTKEY >::iterator priKeyIt ;
- for( priKeyIt = m_tPriKeyList.begin() ; priKeyIt != m_tPriKeyList.end() ; priKeyIt ++ )
+ for( priKeyIt = m_tPriKeyList.begin() ; priKeyIt != m_tPriKeyList.end() ; ++priKeyIt )
CryptDestroyKey( *priKeyIt ) ;
}
@@ -205,12 +202,12 @@ Sequence< OUString > SAL_CALL SecurityEnvironment_MSCryptImpl :: getSupportedSer
Sequence< OUString > SecurityEnvironment_MSCryptImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.SecurityEnvironment" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.SecurityEnvironment")) ;
return seqServiceNames ;
}
OUString SecurityEnvironment_MSCryptImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")) ;
}
//Helper for registry
@@ -267,12 +264,6 @@ void SecurityEnvironment_MSCryptImpl :: setCryptoProvider( HCRYPTPROV aProv ) th
}
if( aProv != NULL ) {
- /*- Replaced by direct adopt for WINNT support ----
- if( !CryptContextAddRef( aProv, NULL, NULL ) )
- throw Exception() ;
- else
- m_hProv = aProv ;
- ----*/
m_hProv = aProv ;
}
}
@@ -323,16 +314,12 @@ void SecurityEnvironment_MSCryptImpl :: adoptSymKey( HCRYPTKEY aSymKey ) throw(
if( aSymKey != NULL ) {
//First try to find the key in the list
- for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; ++keyIt ) {
if( *keyIt == aSymKey )
return ;
}
//If we do not find the key in the list, add a new node
- /*- Replaced with directly adopt for WINNT 4.0 support ----
- if( !CryptDuplicateKey( aSymKey, NULL, 0, &symkey ) )
- throw RuntimeException() ;
- ----*/
symkey = aSymKey ;
try {
@@ -348,7 +335,7 @@ void SecurityEnvironment_MSCryptImpl :: rejectSymKey( HCRYPTKEY aSymKey ) throw(
std::list< HCRYPTKEY >::iterator keyIt ;
if( aSymKey != NULL ) {
- for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; ++keyIt ) {
if( *keyIt == aSymKey ) {
symkey = *keyIt ;
CryptDestroyKey( symkey ) ;
@@ -365,7 +352,7 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getSymKey( unsigned int position )
unsigned int pos ;
symkey = NULL ;
- for( pos = 0, keyIt = m_tSymKeyList.begin() ; pos < position && keyIt != m_tSymKeyList.end() ; pos ++ , keyIt ++ ) ;
+ for( pos = 0, keyIt = m_tSymKeyList.begin() ; pos < position && keyIt != m_tSymKeyList.end() ; ++pos , ++keyIt ) ;
if( pos == position && keyIt != m_tSymKeyList.end() )
symkey = *keyIt ;
@@ -379,16 +366,12 @@ void SecurityEnvironment_MSCryptImpl :: adoptPubKey( HCRYPTKEY aPubKey ) throw(
if( aPubKey != NULL ) {
//First try to find the key in the list
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
if( *keyIt == aPubKey )
return ;
}
//If we do not find the key in the list, add a new node
- /*- Replaced with directly adopt for WINNT 4.0 support ----
- if( !CryptDuplicateKey( aPubKey, NULL, 0, &pubkey ) )
- throw RuntimeException() ;
- ----*/
pubkey = aPubKey ;
try {
@@ -404,7 +387,7 @@ void SecurityEnvironment_MSCryptImpl :: rejectPubKey( HCRYPTKEY aPubKey ) throw(
std::list< HCRYPTKEY >::iterator keyIt ;
if( aPubKey != NULL ) {
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
if( *keyIt == aPubKey ) {
pubkey = *keyIt ;
CryptDestroyKey( pubkey ) ;
@@ -421,7 +404,7 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getPubKey( unsigned int position )
unsigned int pos ;
pubkey = NULL ;
- for( pos = 0, keyIt = m_tPubKeyList.begin() ; pos < position && keyIt != m_tPubKeyList.end() ; pos ++ , keyIt ++ ) ;
+ for( pos = 0, keyIt = m_tPubKeyList.begin() ; pos < position && keyIt != m_tPubKeyList.end() ; ++pos , ++keyIt ) ;
if( pos == position && keyIt != m_tPubKeyList.end() )
pubkey = *keyIt ;
@@ -435,16 +418,12 @@ void SecurityEnvironment_MSCryptImpl :: adoptPriKey( HCRYPTKEY aPriKey ) throw(
if( aPriKey != NULL ) {
//First try to find the key in the list
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
if( *keyIt == aPriKey )
return ;
}
//If we do not find the key in the list, add a new node
- /*- Replaced with directly adopt for WINNT 4.0 support ----
- if( !CryptDuplicateKey( aPriKey, NULL, 0, &prikey ) )
- throw RuntimeException() ;
- ----*/
prikey = aPriKey ;
try {
@@ -460,7 +439,7 @@ void SecurityEnvironment_MSCryptImpl :: rejectPriKey( HCRYPTKEY aPriKey ) throw(
std::list< HCRYPTKEY >::iterator keyIt ;
if( aPriKey != NULL ) {
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
if( *keyIt == aPriKey ) {
prikey = *keyIt ;
CryptDestroyKey( prikey ) ;
@@ -477,7 +456,7 @@ HCRYPTKEY SecurityEnvironment_MSCryptImpl :: getPriKey( unsigned int position )
unsigned int pos ;
prikey = NULL ;
- for( pos = 0, keyIt = m_tPriKeyList.begin() ; pos < position && keyIt != m_tPriKeyList.end() ; pos ++ , keyIt ++ ) ;
+ for( pos = 0, keyIt = m_tPriKeyList.begin() ; pos < position && keyIt != m_tPriKeyList.end() ; ++pos , ++keyIt ) ;
if( pos == position && keyIt != m_tPriKeyList.end() )
prikey = *keyIt ;
@@ -516,21 +495,12 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: getPer
DWORD dwKeySpec;
HCRYPTPROV hCryptProv;
- /*
- hSystemKeyStore = CertOpenStore(
- CERT_STORE_PROV_SYSTEM ,
- 0 ,
- NULL ,
- CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_READONLY_FLAG | CERT_STORE_OPEN_EXISTING_FLAG ,
- L"MY"
- ) ;
- */
hSystemKeyStore = CertOpenSystemStore( 0, "MY" ) ;
if( hSystemKeyStore != NULL ) {
pCertContext = CertEnumCertificatesInStore( hSystemKeyStore, pCertContext );
while (pCertContext)
{
- // Add By CP for checking whether the certificate is a personal certificate or not.
+ // for checking whether the certificate is a personal certificate or not.
if(!(CryptAcquireCertificatePrivateKey(pCertContext,
CRYPT_ACQUIRE_COMPARE_KEY_FLAG,
NULL,
@@ -538,13 +508,12 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: getPer
&dwKeySpec,
NULL)))
{
- // Not Privatekey found. SKIP this one; By CP
+ // Not Privatekey found. SKIP this one.
pCertContext = CertEnumCertificatesInStore( hSystemKeyStore, pCertContext );
continue;
}
// then TODO : Check the personal cert is valid or not.
- // end CP
xcert = MswcryCertContextToXCert( pCertContext ) ;
if( xcert != NULL )
certsList.push_back( xcert ) ;
@@ -561,7 +530,7 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: getPer
std::list< X509Certificate_MSCryptImpl* >::iterator xcertIt ;
Sequence< Reference< XCertificate > > certSeq( length ) ;
- for( i = 0, xcertIt = certsList.begin(); xcertIt != certsList.end(); xcertIt ++, i++ ) {
+ for( i = 0, xcertIt = certsList.begin(); xcertIt != certsList.end(); ++xcertIt, ++i ) {
certSeq[i] = *xcertIt ;
}
@@ -574,7 +543,6 @@ Sequence< Reference < XCertificate > > SecurityEnvironment_MSCryptImpl :: getPer
Reference< XCertificate > SecurityEnvironment_MSCryptImpl :: getCertificate( const OUString& issuerName, const Sequence< sal_Int8 >& serialNumber ) throw( SecurityException , RuntimeException ) {
unsigned int i ;
-// sal_Int8 found = 0 ;
LPSTR pszName ;
X509Certificate_MSCryptImpl *xcert = NULL ;
PCCERT_CONTEXT pCertContext = NULL ;
@@ -582,12 +550,11 @@ Reference< XCertificate > SecurityEnvironment_MSCryptImpl :: getCertificate( con
CRYPT_INTEGER_BLOB cryptSerialNumber ;
CERT_INFO certInfo ;
- // By CP , for correct encoding
+ // for correct encoding
sal_uInt16 encoding ;
rtl_Locale *pLocale = NULL ;
osl_getProcessLocale( &pLocale ) ;
encoding = osl_getTextEncodingFromLocale( pLocale ) ;
- // CP end
//Create cert info from issue and serial
rtl::OString oissuer = rtl::OUStringToOString( issuerName , encoding ) ;
@@ -1214,7 +1181,7 @@ X509Certificate_MSCryptImpl* MswcryCertContextToXCert( PCCERT_CONTEXT cert )
::rtl::OUString SecurityEnvironment_MSCryptImpl::getSecurityEnvironmentInformation() throw( ::com::sun::star::uno::RuntimeException )
{
- return rtl::OUString::createFromAscii("Microsoft Crypto API");
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Microsoft Crypto API"));
}
/* Native methods */
@@ -1310,3 +1277,5 @@ void SecurityEnvironment_MSCryptImpl :: destroyKeysManager(xmlSecKeysMngrPtr pKe
xmlSecKeysMngrDestroy( pKeysMngr ) ;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
index 7d6f21ce1551..c35cd7621a79 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,14 +43,10 @@
#include <cppuhelper/implbase4.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/security/XCertificate.hpp>
@@ -96,26 +93,43 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper4<
virtual ~SecurityEnvironment_MSCryptImpl() ;
//Methods from XSecurityEnvironment
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > SAL_CALL getPersonalCertificates() throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > SAL_CALL getPersonalCertificates()
+ throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL getCertificate( const ::rtl::OUString& issuerName, const ::com::sun::star::uno::Sequence< sal_Int8 >& serialNumber ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL getCertificate(
+ const ::rtl::OUString& issuerName,
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& serialNumber )
+ throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL getCertificate( const ::rtl::OUString& issuerName, const ::rtl::OUString& serialNumber ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL getCertificate(
+ const ::rtl::OUString& issuerName,
+ const ::rtl::OUString& serialNumber )
+ throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > SAL_CALL buildCertificatePath( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& beginCert ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > SAL_CALL buildCertificatePath(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& beginCert )
+ throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL createCertificateFromRaw( const ::com::sun::star::uno::Sequence< sal_Int8 >& rawCertificate ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL createCertificateFromRaw(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rawCertificate )
+ throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL createCertificateFromAscii( const ::rtl::OUString& asciiCertificate ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL createCertificateFromAscii(
+ const ::rtl::OUString& asciiCertificate )
+ throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
virtual ::sal_Int32 SAL_CALL verifyCertificate(
const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
::com::sun::star::security::XCertificate > >& intermediateCertificates)
throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ;
- virtual ::sal_Int32 SAL_CALL getCertificateCharacters( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert ) throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ;
- virtual ::rtl::OUString SAL_CALL getSecurityEnvironmentInformation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getCertificateCharacters(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& xCert )
+ throw (::com::sun::star::uno::SecurityException, ::com::sun::star::uno::RuntimeException) ;
+
+ virtual ::rtl::OUString SAL_CALL getSecurityEnvironmentInformation( )
+ throw (::com::sun::star::uno::RuntimeException);
//Methods from XInitialization
@@ -138,9 +152,12 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper4<
static ::rtl::OUString impl_getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) ;
//Helper for registry
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) throw( ::com::sun::star::uno::RuntimeException ) ;
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager )
+ throw( ::com::sun::star::uno::RuntimeException ) ;
- static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) ;
+ static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) ;
//Methods from XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
@@ -151,41 +168,30 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper4<
//Native mehtods
virtual HCRYPTPROV getCryptoProvider() throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void setCryptoProvider( HCRYPTPROV aProv ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual LPCTSTR getKeyContainer() throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void setKeyContainer( LPCTSTR aKeyContainer ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual HCERTSTORE getCryptoSlot() throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void setCryptoSlot( HCERTSTORE aKeyStore ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual HCERTSTORE getCertDb() throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void setCertDb( HCERTSTORE aCertDb ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void adoptSymKey( HCRYPTKEY aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void rejectSymKey( HCRYPTKEY aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual HCRYPTKEY getSymKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void adoptPubKey( HCRYPTKEY aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void rejectPubKey( HCRYPTKEY aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual HCRYPTKEY getPubKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void adoptPriKey( HCRYPTKEY aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void rejectPriKey( HCRYPTKEY aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual HCRYPTKEY getPriKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void enableDefaultCrypt( sal_Bool enable ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual sal_Bool defaultEnabled() throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
//Native mehtods
@@ -196,3 +202,4 @@ class SecurityEnvironment_MSCryptImpl : public ::cppu::WeakImplHelper4<
#endif // _XSECURITYENVIRONMENT_MSCRYPTIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
index 43c0bc53cb22..72063a140240 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -236,3 +237,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL SEInitializer_MSCryptImpl::getSupported
return SEInitializer_MSCryptImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx
index 8acd41dfa539..1553155c9e37 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/seinitializer_mscryptimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define _SEINITIALIZERIMPL_HXX
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-#ifndef _COM_SUN_STAR_XML_CRYPTO_SEINITIALIZER_HPP_
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
-#endif
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -55,9 +54,6 @@ class SEInitializer_MSCryptImpl : public cppu::WeakImplHelper2
* instance. After this instance is used up, use this class to free this
* instance.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XSEInitializer, XSEInitializer
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -106,3 +102,4 @@ SAL_CALL SEInitializer_MSCryptImpl_createInstance( const com::sun::star::uno::Re
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index fd3f0aca0952..2f6f6f4cc6d5 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,18 +34,13 @@
#include "certificateextension_xmlsecimpl.hxx"
#include "sanextension_mscryptimpl.hxx"
-//MM : added by MM
#include "oid.hxx"
-//MM : end
-//CP : added by CP
#include <rtl/locale.h>
#include <osl/nlsupport.h>
#include <osl/process.h>
#include <utility>
-//CP : end
-
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::security ;
using ::rtl::OUString ;
@@ -241,15 +237,14 @@ sal_Int16 SAL_CALL X509Certificate_MSCryptImpl :: getVersion() throw ( ::com::su
throw RuntimeException() ;
}
- // By CP , for correct encoding
+ // for correct encoding
sal_uInt16 encoding ;
rtl_Locale *pLocale = NULL ;
osl_getProcessLocale( &pLocale ) ;
encoding = osl_getTextEncodingFromLocale( pLocale ) ;
- // CP end
if(issuer[cbIssuer-1] == 0) cbIssuer--; //delimit the last 0x00;
- OUString xIssuer(issuer , cbIssuer ,encoding ) ; //By CP
+ OUString xIssuer(issuer , cbIssuer ,encoding ) ;
delete [] issuer ;
return replaceTagSWithTagST(xIssuer);
@@ -516,7 +511,6 @@ X509Certificate_MSCryptImpl* X509Certificate_MSCryptImpl :: getImplementation( c
return NULL ;
}
-// MM : added by MM
::rtl::OUString findOIDDescription(char *oid)
{
OUString ouOID = OUString::createFromAscii( oid );
@@ -662,5 +656,4 @@ sal_Int32 SAL_CALL X509Certificate_MSCryptImpl::getCertificateUsage( )
return usage;
}
-// MM : end
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx
index 209a8a6ce10d..4fc3a0260d15 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,43 +61,27 @@ class X509Certificate_MSCryptImpl : public ::cppu::WeakImplHelper2<
virtual sal_Int16 SAL_CALL getVersion() throw ( ::com::sun::star::uno::RuntimeException) ;
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getSerialNumber() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::rtl::OUString SAL_CALL getIssuerName() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::rtl::OUString SAL_CALL getSubjectName() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::util::DateTime SAL_CALL getNotValidBefore() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::util::DateTime SAL_CALL getNotValidAfter() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getIssuerUniqueID() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getSubjectUniqueID() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificateExtension > > SAL_CALL getExtensions() throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificateExtension > SAL_CALL findCertificateExtension( const ::com::sun::star::uno::Sequence< sal_Int8 >& oid ) throw (::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getEncoded() throw ( ::com::sun::star::uno::RuntimeException) ;
-
- // MM : added by MM
virtual ::rtl::OUString SAL_CALL getSubjectPublicKeyAlgorithm()
throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getSubjectPublicKeyValue()
throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::rtl::OUString SAL_CALL getSignatureAlgorithm()
throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getSHA1Thumbprint()
throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getMD5Thumbprint()
throw ( ::com::sun::star::uno::RuntimeException) ;
virtual sal_Int32 SAL_CALL getCertificateUsage( ) throw ( ::com::sun::star::uno::RuntimeException) ;
- // MM : end
//Methods from XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (com::sun::star::uno::RuntimeException);
@@ -112,3 +97,4 @@ class X509Certificate_MSCryptImpl : public ::cppu::WeakImplHelper2<
#endif // _X509CERTIFICATE_MSCRYPTIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
index e30eabfb279e..7e04922939e2 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,17 +33,11 @@
#include <rtl/uuid.h>
#include "xmlencryption_mscryptimpl.hxx"
-#ifndef _XMLDOCUMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmldocumentwrapper_xmlsecimpl.hxx"
-#endif
-#ifndef _XMLELEMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmlelementwrapper_xmlsecimpl.hxx"
-#endif
-#ifndef _SECURITYENVIRONMENT_MSCRYPTIMPL_HXX_
#include "securityenvironment_mscryptimpl.hxx"
-#endif
#include "errorcallback.hxx"
#include "xmlsec/xmlsec.h"
@@ -368,12 +363,12 @@ Sequence< OUString > SAL_CALL XMLEncryption_MSCryptImpl :: getSupportedServiceNa
Sequence< OUString > XMLEncryption_MSCryptImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLEncryption" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryption")) ;
return seqServiceNames ;
}
OUString XMLEncryption_MSCryptImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl")) ;
}
//Helper for registry
@@ -388,3 +383,4 @@ Reference< XSingleServiceFactory > XMLEncryption_MSCryptImpl :: impl_createFacto
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx
index fdc3d0ff41f8..539c9afff55f 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/crypto/XXMLEncryption.hpp>
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
@@ -100,3 +97,4 @@ class XMLEncryption_MSCryptImpl : public ::cppu::WeakImplHelper3<
#endif // _XMLENCRYPTION_MSCRYPTIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
index 034bb70c591a..c9fed3227f0b 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <rtl/uuid.h>
#include "securityenvironment_mscryptimpl.hxx"
-#ifndef _XMLSECURITYCONTEXT_MSCRYPTIMPL_HXX_
#include "xmlsecuritycontext_mscryptimpl.hxx"
-#endif
#include "xmlstreamio.hxx"
#include "xmlsec/xmlsec.h"
@@ -283,12 +282,12 @@ Sequence< OUString > SAL_CALL XMLSecurityContext_MSCryptImpl :: getSupportedServ
Sequence< OUString > XMLSecurityContext_MSCryptImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSecurityContext" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSecurityContext")) ;
return seqServiceNames ;
}
OUString XMLSecurityContext_MSCryptImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")) ;
}
//Helper for registry
@@ -343,3 +342,4 @@ xmlSecKeysMngrPtr XMLSecurityContext_MSCryptImpl :: keysManager() throw( Excepti
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx
index b6ad409ad4be..dfc8217aa957 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,20 +35,15 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-//#include "xmlsec/xmlsec.h"
class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3<
::com::sun::star::xml::crypto::XXMLSecurityContext ,
@@ -135,3 +131,4 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3<
#endif // _XMLSIGNATURECONTEXT_MSCRYPTIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index 80db62742f24..eb1dd5615065 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,21 +33,11 @@
#include "com/sun/star/xml/crypto/SecurityOperationStatus.hdl"
#include "xmlsignature_mscryptimpl.hxx"
-
-#ifndef _XMLDOCUMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmldocumentwrapper_xmlsecimpl.hxx"
-#endif
-
-#ifndef _XMLELEMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmlelementwrapper_xmlsecimpl.hxx"
-#endif
-
-#ifndef _SECURITYENVIRONMENT_MSCRYPTIMPL_HXX_
#include "securityenvironment_mscryptimpl.hxx"
-#endif
#include "xmlstreamio.hxx"
#include "errorcallback.hxx"
-
#include "xmlsec/xmlsec.h"
#include "xmlsec/xmldsig.h"
#include "xmlsec/crypto.h"
@@ -180,7 +171,6 @@ SAL_CALL XMLSignature_MSCryptImpl :: validate(
xmlSecKeysMngrPtr pMngr = NULL ;
xmlSecDSigCtxPtr pDsigCtx = NULL ;
xmlNodePtr pNode = NULL ;
- //sal_Bool valid ;
if( !aTemplate.is() )
throw RuntimeException() ;
@@ -225,15 +215,6 @@ SAL_CALL XMLSignature_MSCryptImpl :: validate(
throw RuntimeException() ;
}
- //added for test: save the result
- /*
- {
- FILE *dstFile = fopen( "c:\\1.txt", "w" ) ;
- xmlDocDump( dstFile, pNode->doc) ;
- fclose( dstFile ) ;
- }
- */
-
setErrorRecorder( );
pMngr = pSecEnv->createKeysManager() ; //i39448
@@ -246,7 +227,6 @@ SAL_CALL XMLSignature_MSCryptImpl :: validate(
if( pDsigCtx == NULL )
{
pSecEnv->destroyKeysManager( pMngr ) ; //i39448
- //throw XMLSignatureException() ;
clearErrorRecorder();
return aTemplate;
}
@@ -312,12 +292,12 @@ Sequence< OUString > SAL_CALL XMLSignature_MSCryptImpl :: getSupportedServiceNam
Sequence< OUString > XMLSignature_MSCryptImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignature" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignature")) ;
return seqServiceNames ;
}
OUString XMLSignature_MSCryptImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl")) ;
}
//Helper for registry
@@ -326,9 +306,7 @@ Reference< XInterface > SAL_CALL XMLSignature_MSCryptImpl :: impl_createInstance
}
Reference< XSingleServiceFactory > XMLSignature_MSCryptImpl :: impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) {
- //Reference< XSingleServiceFactory > xFactory ;
- //xFactory = ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName , impl_createInstance , impl_getSupportedServiceNames ) ;
- //return xFactory ;
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx
index 5f5178773221..d31050484548 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
@@ -100,3 +97,4 @@ class XMLSignature_MSCryptImpl : public ::cppu::WeakImplHelper3<
#endif // _XMLSIGNATURE_MSCRYPTIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
index 8044cd403c83..4d6dbd52d88d 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xsec_mscrypt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,5 @@ void* SAL_CALL mscrypt_component_getFactory( const sal_Char* pImplName , void* p
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/certerrors.h b/xmlsecurity/source/xmlsec/nss/certerrors.h
index 9b9801f21f59..d91fff52923d 100644
--- a/xmlsecurity/source/xmlsec/nss/certerrors.h
+++ b/xmlsecurity/source/xmlsec/nss/certerrors.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: securityenvironment_nssimpl.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -28,7 +26,6 @@
*
************************************************************************/
-
{SEC_ERROR_IO, "An I/O error occurred during security authorization."},
{SEC_ERROR_LIBRARY_FAILURE, "security library failure."},
@@ -370,7 +367,12 @@ an existing cert, but that is not the same cert."},
{SEC_ERROR_BAD_INFO_ACCESS_LOCATION, "Bad information access location in cert extension"},
-{SEC_ERROR_LIBPKIX_INTERNAL, "Libpkix internal error occured during cert validation."},
+{SEC_ERROR_LIBPKIX_INTERNAL, "Libpkix internal error occurred during cert validation."},
+
+#if ( NSS_VMAJOR > 3 ) || ( NSS_VMAJOR == 3 && NSS_VMINOR > 12 ) || ( NSS_VMAJOR == 3 && NSS_VMINOR == 12 && NSS_VPATCH > 2 )
+// following 3 errors got first used in NSS 3.12.3
+// they were in the header even in 3.12.2 but there was missing the mapping in pk11err.c
+// see also https://bugzilla.mozilla.org/show_bug.cgi?id=453364
{SEC_ERROR_PKCS11_GENERAL_ERROR, "A PKCS #11 module returned CKR_GENERAL_ERROR, indicating that an unrecoverable error has occurred."},
@@ -378,7 +380,15 @@ an existing cert, but that is not the same cert."},
{SEC_ERROR_PKCS11_DEVICE_ERROR, "A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot."},
+#endif
+
+#if ( NSS_VMAJOR > 3 ) || ( NSS_VMAJOR == 3 && NSS_VMINOR > 12 ) || ( NSS_VMAJOR == 3 && NSS_VMINOR == 12 && NSS_VPATCH > 3 )
+// following 2 errors got added in NSS 3.12.4
+
{SEC_ERROR_BAD_INFO_ACCESS_METHOD, "Unknown information access method in certificate extension."},
{SEC_ERROR_CRL_IMPORT_FAILED, "Error attempting to import a CRL."},
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/makefile.mk b/xmlsecurity/source/xmlsec/nss/makefile.mk
index 5e968a334ed5..ce088e2bb3dc 100644
--- a/xmlsecurity/source/xmlsec/nss/makefile.mk
+++ b/xmlsecurity/source/xmlsec/nss/makefile.mk
@@ -85,21 +85,6 @@ INCPOST += \
$(MOZ_INC)$/profile \
-I$(MOZ_INC)$/string \
-I$(MOZ_INC)$/embed_base
-#.IF "$(OS)" == "LINUX"
-#CFLAGS += -fPIC -g
-#CFLAGSCXX += \
-# -fno-rtti -Wall -Wconversion -Wpointer-arith \
-# -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
-# -Wno-long-long -pthread
-#CDEFS += -DTRACING
-#.ELIF "$(OS)" == "NETBSD"
-#CFLAGS += -fPIC
-#CFLAGSCXX += \
-# -fno-rtti -Wall -Wconversion -Wpointer-arith \
-# -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth \
-# -Wno-long-long
-#CDEFS += -DTRACING
-#.ENDIF
.ENDIF
.IF "$(CRYPTO_ENGINE)" == "nss"
diff --git a/xmlsecurity/source/xmlsec/nss/nssrenam.h b/xmlsecurity/source/xmlsec/nss/nssrenam.h
index 1742e1492d35..bc3249e1bfc4 100644
--- a/xmlsecurity/source/xmlsec/nss/nssrenam.h
+++ b/xmlsecurity/source/xmlsec/nss/nssrenam.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
@@ -47,3 +48,5 @@
#define PBE_GenerateBits __PBE_GenerateBits
#endif /* __nssrenam_h_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.cxx b/xmlsecurity/source/xmlsec/nss/secerror.cxx
index 4a9ee3622bc4..34c9421bf1fb 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.cxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: securityenvironment_nssimpl.cxx,v $
- * $Revision: 1.23 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,6 +31,7 @@
#include "sslerr.h"
#include "nspr.h"
#include "certt.h"
+#include <sal/macros.h>
#include "../diagnose.hxx"
@@ -60,7 +59,7 @@ const char *
getCertError(PRErrorCode errNum)
{
static char sEmpty[] = "";
- const int numDesc = sizeof(allDesc) / sizeof(ErrDesc);
+ const int numDesc = SAL_N_ELEMENTS(allDesc);
for (int i = 0; i < numDesc; i++)
{
if (allDesc[i].errNum == errNum)
@@ -73,7 +72,6 @@ getCertError(PRErrorCode errNum)
void
printChainFailure(CERTVerifyLog *log)
{
- unsigned long errorFlags = 0;
unsigned int depth = (unsigned int)-1;
const char * specificError = NULL;
const char * issuer = NULL;
@@ -82,6 +80,7 @@ printChainFailure(CERTVerifyLog *log)
if (log->count > 0)
{
xmlsec_trace("Bad certifcation path:");
+ unsigned long errorFlags = 0;
for (node = log->head; node; node = node->next)
{
if (depth != node->depth)
@@ -163,3 +162,5 @@ printChainFailure(CERTVerifyLog *log)
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.hxx b/xmlsecurity/source/xmlsec/nss/secerror.hxx
index 732fef5fd03e..79878d14daaa 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.hxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: securityenvironment_nssimpl.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,3 +36,4 @@ void
printChainFailure(CERTVerifyLog *log);
#endif // _XSECERROR_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index ca99ee379a9c..ab08a5fd9938 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,6 +37,7 @@
#include "ocsp.h"
#include <sal/config.h>
+#include <sal/macros.h>
#include "securityenvironment_nssimpl.hxx"
#include "x509certificate_nssimpl.hxx"
#include <rtl/uuid.h>
@@ -65,7 +67,7 @@
#include "secerror.hxx"
-// MM : added for password exception
+// added for password exception
#include <com/sun/star/security/NoPasswordException.hpp>
namespace csss = ::com::sun::star::security;
using namespace xmlsecurity;
@@ -120,7 +122,7 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ )
if ( xMSF.is() )
{
uno::Reference < task::XInteractionHandler > xInteractionHandler(
- xMSF->createInstance( rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler") ), uno::UNO_QUERY );
+ xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler")) ), uno::UNO_QUERY );
if ( xInteractionHandler.is() )
{
@@ -163,21 +165,21 @@ SecurityEnvironment_NssImpl :: ~SecurityEnvironment_NssImpl() {
if( !m_tSymKeyList.empty() ) {
std::list< PK11SymKey* >::iterator symKeyIt ;
- for( symKeyIt = m_tSymKeyList.begin() ; symKeyIt != m_tSymKeyList.end() ; symKeyIt ++ )
+ for( symKeyIt = m_tSymKeyList.begin() ; symKeyIt != m_tSymKeyList.end() ; ++symKeyIt )
PK11_FreeSymKey( *symKeyIt ) ;
}
if( !m_tPubKeyList.empty() ) {
std::list< SECKEYPublicKey* >::iterator pubKeyIt ;
- for( pubKeyIt = m_tPubKeyList.begin() ; pubKeyIt != m_tPubKeyList.end() ; pubKeyIt ++ )
+ for( pubKeyIt = m_tPubKeyList.begin() ; pubKeyIt != m_tPubKeyList.end() ; ++pubKeyIt )
SECKEY_DestroyPublicKey( *pubKeyIt ) ;
}
if( !m_tPriKeyList.empty() ) {
std::list< SECKEYPrivateKey* >::iterator priKeyIt ;
- for( priKeyIt = m_tPriKeyList.begin() ; priKeyIt != m_tPriKeyList.end() ; priKeyIt ++ )
+ for( priKeyIt = m_tPriKeyList.begin() ; priKeyIt != m_tPriKeyList.end() ; ++priKeyIt )
SECKEY_DestroyPrivateKey( *priKeyIt ) ;
}
}
@@ -212,12 +214,12 @@ Sequence< OUString > SAL_CALL SecurityEnvironment_NssImpl :: getSupportedService
Sequence< OUString > SecurityEnvironment_NssImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.SecurityEnvironment" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.SecurityEnvironment")) ;
return seqServiceNames ;
}
OUString SecurityEnvironment_NssImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")) ;
}
//Helper for registry
@@ -226,9 +228,6 @@ Reference< XInterface > SAL_CALL SecurityEnvironment_NssImpl :: impl_createInsta
}
Reference< XSingleServiceFactory > SecurityEnvironment_NssImpl :: impl_createFactory( const Reference< XMultiServiceFactory >& aServiceManager ) {
- //Reference< XSingleServiceFactory > xFactory ;
- //xFactory = ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName , impl_createInstance , impl_getSupportedServiceNames ) ;
- //return xFactory ;
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
@@ -300,7 +299,7 @@ void SecurityEnvironment_NssImpl :: adoptSymKey( PK11SymKey* aSymKey ) throw( Ex
if( aSymKey != NULL ) {
//First try to find the key in the list
- for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; ++keyIt ) {
if( *keyIt == aSymKey )
return ;
}
@@ -323,7 +322,7 @@ void SecurityEnvironment_NssImpl :: rejectSymKey( PK11SymKey* aSymKey ) throw( E
std::list< PK11SymKey* >::iterator keyIt ;
if( aSymKey != NULL ) {
- for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tSymKeyList.begin() ; keyIt != m_tSymKeyList.end() ; ++keyIt ) {
if( *keyIt == aSymKey ) {
symkey = *keyIt ;
PK11_FreeSymKey( symkey ) ;
@@ -354,7 +353,7 @@ void SecurityEnvironment_NssImpl :: adoptPubKey( SECKEYPublicKey* aPubKey ) thro
if( aPubKey != NULL ) {
//First try to find the key in the list
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
if( *keyIt == aPubKey )
return ;
}
@@ -377,7 +376,7 @@ void SecurityEnvironment_NssImpl :: rejectPubKey( SECKEYPublicKey* aPubKey ) thr
std::list< SECKEYPublicKey* >::iterator keyIt ;
if( aPubKey != NULL ) {
- for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPubKeyList.begin() ; keyIt != m_tPubKeyList.end() ; ++keyIt ) {
if( *keyIt == aPubKey ) {
pubkey = *keyIt ;
SECKEY_DestroyPublicKey( pubkey ) ;
@@ -408,7 +407,7 @@ void SecurityEnvironment_NssImpl :: adoptPriKey( SECKEYPrivateKey* aPriKey ) thr
if( aPriKey != NULL ) {
//First try to find the key in the list
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
if( *keyIt == aPriKey )
return ;
}
@@ -431,7 +430,7 @@ void SecurityEnvironment_NssImpl :: rejectPriKey( SECKEYPrivateKey* aPriKey ) th
std::list< SECKEYPrivateKey* >::iterator keyIt ;
if( aPriKey != NULL ) {
- for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; keyIt ++ ) {
+ for( keyIt = m_tPriKeyList.begin() ; keyIt != m_tPriKeyList.end() ; ++keyIt ) {
if( *keyIt == aPriKey ) {
prikey = *keyIt ;
SECKEY_DestroyPrivateKey( prikey ) ;
@@ -558,7 +557,7 @@ SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException
if( !m_tPriKeyList.empty() ) {
std::list< SECKEYPrivateKey* >::iterator priKeyIt ;
- for( priKeyIt = m_tPriKeyList.begin() ; priKeyIt != m_tPriKeyList.end() ; priKeyIt ++ ) {
+ for( priKeyIt = m_tPriKeyList.begin() ; priKeyIt != m_tPriKeyList.end() ; ++priKeyIt ) {
xcert = NssPrivKeyToXCert( *priKeyIt ) ;
if( xcert != NULL )
certsList.push_back( xcert ) ;
@@ -571,7 +570,7 @@ SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException
std::list< X509Certificate_NssImpl* >::iterator xcertIt ;
Sequence< Reference< XCertificate > > certSeq( length ) ;
- for( i = 0, xcertIt = certsList.begin(); xcertIt != certsList.end(); xcertIt ++, i++ ) {
+ for( i = 0, xcertIt = certsList.begin(); xcertIt != certsList.end(); ++xcertIt, ++i ) {
certSeq[i] = *xcertIt ;
}
@@ -597,55 +596,14 @@ Reference< XCertificate > SecurityEnvironment_NssImpl :: getCertificate( const O
if( arena == NULL )
throw RuntimeException() ;
- /*
- * mmi : because MS Crypto use the 'S' tag (equal to the 'ST' tag in NSS), but the NSS can't recognise
- * it, so the 'S' tag should be changed to 'ST' tag
- *
- * PS : it can work, but inside libxmlsec, the 'S' tag is till used to find cert in NSS engine, so it
- * is not useful at all. (comment out now)
- */
-
- /*
- sal_Int32 nIndex = 0;
- OUString newIssuerName;
- do
- {
- OUString aToken = issuerName.getToken( 0, ',', nIndex ).trim();
- if (aToken.compareToAscii("S=",2) == 0)
- {
- newIssuerName+=OUString::createFromAscii("ST=");
- newIssuerName+=aToken.copy(2);
- }
- else
- {
- newIssuerName+=aToken;
- }
-
- if (nIndex >= 0)
- {
- newIssuerName+=OUString::createFromAscii(",");
- }
- } while ( nIndex >= 0 );
- */
-
- /* end */
-
- //Create cert info from issue and serial
+ // Create cert info from issue and serial
rtl::OString ostr = rtl::OUStringToOString( issuerName , RTL_TEXTENCODING_UTF8 ) ;
chIssuer = PL_strndup( ( char* )ostr.getStr(), ( int )ostr.getLength() ) ;
nmIssuer = CERT_AsciiToName( chIssuer ) ;
if( nmIssuer == NULL ) {
PL_strfree( chIssuer ) ;
PORT_FreeArena( arena, PR_FALSE ) ;
-
- /*
- * i40394
- *
- * mmi : no need to throw exception
- * just return "no found"
- */
- //throw RuntimeException() ;
- return NULL;
+ return NULL; // no need for exception cf. i40394
}
derIssuer = SEC_ASN1EncodeItem( arena, NULL, ( void* )nmIssuer, SEC_ASN1_GET( CERT_NameTemplate ) ) ;
@@ -852,9 +810,13 @@ verifyCertificate( const Reference< csss::XCertificate >& aCert,
CERT_DisableOCSPDefaultResponder(certDb);
CERTValOutParam cvout[5];
CERTValInParam cvin[3];
+ int ncvinCount=0;
- cvin[0].type = cert_pi_useAIACertFetch;
- cvin[0].value.scalar.b = PR_TRUE;
+#if ( NSS_VMAJOR > 3 ) || ( NSS_VMAJOR == 3 && NSS_VMINOR > 12 ) || ( NSS_VMAJOR == 3 && NSS_VMINOR == 12 && NSS_VPATCH > 0 )
+ cvin[ncvinCount].type = cert_pi_useAIACertFetch;
+ cvin[ncvinCount].value.scalar.b = PR_TRUE;
+ ncvinCount++;
+#endif
PRUint64 revFlagsLeaf[2];
PRUint64 revFlagsChain[2];
@@ -884,7 +846,6 @@ verifyCertificate( const Reference< csss::XCertificate >& aCert,
rev.leafTests.preferred_methods = NULL;
rev.leafTests.cert_rev_method_independent_flags =
CERT_REV_MI_TEST_ALL_LOCAL_INFORMATION_FIRST;
-// | CERT_REV_MI_REQUIRE_SOME_FRESH_INFO_AVAILABLE;
rev.chainTests.number_of_defined_methods = 2;
rev.chainTests.cert_rev_flags_per_method = revFlagsChain;
@@ -898,15 +859,16 @@ verifyCertificate( const Reference< csss::XCertificate >& aCert,
rev.chainTests.preferred_methods = NULL;
rev.chainTests.cert_rev_method_independent_flags =
CERT_REV_MI_TEST_ALL_LOCAL_INFORMATION_FIRST;
-// | CERT_REV_MI_REQUIRE_SOME_FRESH_INFO_AVAILABLE;
- cvin[1].type = cert_pi_revocationFlags;
- cvin[1].value.pointer.revocation = &rev;
+ cvin[ncvinCount].type = cert_pi_revocationFlags;
+ cvin[ncvinCount].value.pointer.revocation = &rev;
+ ncvinCount++;
// does not work, not implemented yet in 3.12.4
-// cvin[2].type = cert_pi_keyusage;
-// cvin[2].value.scalar.ui = KU_DIGITAL_SIGNATURE;
- cvin[2].type = cert_pi_end;
+// cvin[ncvinCount].type = cert_pi_keyusage;
+// cvin[ncvinCount].value.scalar.ui = KU_DIGITAL_SIGNATURE;
+// ncvinCount++;
+ cvin[ncvinCount].type = cert_pi_end;
cvout[0].type = cert_po_trustAnchor;
cvout[0].value.pointer.cert = NULL;
@@ -935,7 +897,7 @@ verifyCertificate( const Reference< csss::XCertificate >& aCert,
arUsages[3] = UsageDescription( certificateUsageEmailSigner, "certificateUsageEmailSigner" );
arUsages[4] = UsageDescription( certificateUsageEmailRecipient, "certificateUsageEmailRecipient" );
- int numUsages = sizeof(arUsages) / sizeof(UsageDescription);
+ int numUsages = SAL_N_ELEMENTS(arUsages);
for (int i = 0; i < numUsages; i++)
{
xmlsec_trace("Testing usage %d of %d: %s (0x%x)", i + 1,
@@ -996,7 +958,7 @@ verifyCertificate( const Reference< csss::XCertificate >& aCert,
//Destroying the temporary certificates
std::vector<CERTCertificate*>::const_iterator cert_i;
- for (cert_i = vecTmpNSSCertificates.begin(); cert_i != vecTmpNSSCertificates.end(); cert_i++)
+ for (cert_i = vecTmpNSSCertificates.begin(); cert_i != vecTmpNSSCertificates.end(); ++cert_i)
{
xmlsec_trace("Destroying temporary certificate");
CERT_DestroyCertificate(*cert_i);
@@ -1166,3 +1128,5 @@ void SecurityEnvironment_NssImpl::destroyKeysManager(xmlSecKeysMngrPtr pKeysMngr
xmlSecKeysMngrDestroy( pKeysMngr ) ;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
index 8b2192a00b1f..3488692e023e 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <cppuhelper/implbase4.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/security/XCertificate.hpp>
@@ -137,33 +134,25 @@ private :
virtual void setCertDb( CERTCertDBHandle* aCertDb ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void adoptSymKey( PK11SymKey* aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void rejectSymKey( PK11SymKey* aSymKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual PK11SymKey* getSymKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void adoptPubKey( SECKEYPublicKey* aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void rejectPubKey( SECKEYPublicKey* aPubKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual SECKEYPublicKey* getPubKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual void adoptPriKey( SECKEYPrivateKey* aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual void rejectPriKey( SECKEYPrivateKey* aPriKey ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
virtual SECKEYPrivateKey* getPriKey( unsigned int position ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > SAL_CALL getPersonalCertificates() throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL getCertificate( const ::rtl::OUString& issuerName, const ::com::sun::star::uno::Sequence< sal_Int8 >& serialNumber ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
-
virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL getCertificate( const ::rtl::OUString& issuerName, const ::rtl::OUString& serialNumber ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > > SAL_CALL buildCertificatePath( const ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate >& beginCert ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL createCertificateFromRaw( const ::com::sun::star::uno::Sequence< sal_Int8 >& rawCertificate ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
-
virtual ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > SAL_CALL createCertificateFromAscii( const ::rtl::OUString& asciiCertificate ) throw( ::com::sun::star::uno::SecurityException , ::com::sun::star::uno::RuntimeException ) ;
@@ -175,9 +164,8 @@ private:
void updateSlots();
virtual void addCryptoSlot( PK11SlotInfo* aSlot ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
-
-
} ;
#endif // _XSECURITYENVIRONMENT_NSSIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
index 5c56124c880a..1e521cf272fd 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,6 +84,7 @@ using ::rtl::OString;
#define SECURITY_ENVIRONMENT "com.sun.star.xml.crypto.SecurityEnvironment"
#define SECURITY_CONTEXT "com.sun.star.xml.crypto.XMLSecurityContext"
+ int nProduct = 4;
SEInitializer_NssImpl::SEInitializer_NssImpl(
const css::uno::Reference< css::lang::XMultiServiceFactory > &rxMSF )
{
@@ -194,3 +196,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL SEInitializer_NssImpl::getSupportedServ
return SEInitializer_NssImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
index 469d19bcb331..776c2ffd4a78 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,4 @@ SAL_CALL SEInitializer_NssImpl_createInstance( const ::com::sun::star::uno::Refe
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index 5028edb391d1..c1ef726d5204 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,21 +36,15 @@
#include "nss.h"
#include "secder.h"
-//MM : added by MM
#include "hasht.h"
#include "secoid.h"
#include "pk11func.h"
-//MM : end
-
-
#include <sal/config.h>
#include <rtl/uuid.h>
#include "x509certificate_nssimpl.hxx"
-#ifndef _CERTIFICATEEXTENSION_NSSIMPL_HXX_
#include "certificateextension_xmlsecimpl.hxx"
-#endif
#ifndef _SANEXTENSION_NSSIMPL_HXX_
#include "sanextension_nssimpl.hxx"
@@ -355,7 +350,6 @@ X509Certificate_NssImpl* X509Certificate_NssImpl :: getImplementation( const Ref
return NULL ;
}
-// MM : added by MM
::rtl::OUString getAlgorithmDescription(SECAlgorithmID *aid)
{
SECOidTag tag;
@@ -371,23 +365,15 @@ X509Certificate_NssImpl* X509Certificate_NssImpl :: getImplementation( const Ref
if( pCert != NULL )
{
unsigned char fingerprint[20];
- //char *fpStr = NULL;
- SECItem fpItem;
int length = ((id == SEC_OID_MD5)?MD5_LENGTH:SHA1_LENGTH);
memset(fingerprint, 0, sizeof fingerprint);
PK11_HashBuf(id, fingerprint, pCert->derCert.data, pCert->derCert.len);
- fpItem.data = fingerprint;
- fpItem.len = length;
- //fpStr = CERT_Hexify(&fpItem, 1);
Sequence< sal_Int8 > thumbprint( length ) ;
for( int i = 0 ; i < length ; i ++ )
- {
thumbprint[i] = fingerprint[i];
- }
- //PORT_Free(fpStr);
return thumbprint;
}
else
@@ -490,5 +476,4 @@ sal_Int32 SAL_CALL X509Certificate_NssImpl::getCertificateUsage( )
return usage;
}
-// MM : end
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
index c486cb4a9e8c..b84e977e7b2a 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,15 +57,12 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper2<
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getSerialNumber( ) throw ( ::com::sun::star::uno::RuntimeException) ;
virtual ::rtl::OUString SAL_CALL getIssuerName( ) throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::rtl::OUString SAL_CALL getSubjectName( ) throw ( ::com::sun::star::uno::RuntimeException) ;
virtual ::com::sun::star::util::DateTime SAL_CALL getNotValidBefore( ) throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::util::DateTime SAL_CALL getNotValidAfter( ) throw ( ::com::sun::star::uno::RuntimeException) ;
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getIssuerUniqueID( ) throw ( ::com::sun::star::uno::RuntimeException) ;
-
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getSubjectUniqueID( ) throw ( ::com::sun::star::uno::RuntimeException) ;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificateExtension > > SAL_CALL getExtensions( ) throw ( ::com::sun::star::uno::RuntimeException) ;
@@ -73,7 +71,6 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper2<
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getEncoded( ) throw ( ::com::sun::star::uno::RuntimeException) ;
- // MM : added by MM
virtual ::rtl::OUString SAL_CALL getSubjectPublicKeyAlgorithm()
throw ( ::com::sun::star::uno::RuntimeException) ;
@@ -90,7 +87,6 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper2<
throw ( ::com::sun::star::uno::RuntimeException) ;
virtual sal_Int32 SAL_CALL getCertificateUsage( ) throw ( ::com::sun::star::uno::RuntimeException) ;
- // MM : end
//Methods from XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw (com::sun::star::uno::RuntimeException);
@@ -106,3 +102,4 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper2<
#endif // _X509CERTIFICATE_NSSIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
index 65da3caaf174..71c443b437c3 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,17 +32,11 @@
#include <rtl/uuid.h>
#include "xmlencryption_nssimpl.hxx"
-#ifndef _XMLDOCUMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmldocumentwrapper_xmlsecimpl.hxx"
-#endif
-#ifndef _XMLELEMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmlelementwrapper_xmlsecimpl.hxx"
-#endif
-#ifndef _SECURITYENVIRONMENT_NSSIMPL_HXX_
#include "securityenvironment_nssimpl.hxx"
-#endif
#include "errorcallback.hxx"
#include <sal/types.h>
@@ -104,12 +99,6 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
throw RuntimeException() ;
}
-#if 0
- XMLSecurityContext_NssImpl* pSecCtxt = ( XMLSecurityContext_NssImpl* )xSecTunnel->getSomething( XMLSecurityContext_NssImpl::getUnoTunnelId() ) ;
- if( pSecCtxt == NULL )
- throw RuntimeException() ;
-#endif
-
SecurityEnvironment_NssImpl* pSecEnv =
reinterpret_cast<SecurityEnvironment_NssImpl*>(
sal::static_int_cast<sal_uIntPtr>(xSecTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ))) ;
@@ -135,7 +124,7 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
throw RuntimeException() ;
}
- //MM : Get the element to be encrypted
+ // Get the element to be encrypted
Reference< XXMLElementWrapper > xTarget = aTemplate->getTarget() ;
if( !xTarget.is() ) {
throw XMLEncryptionException() ;
@@ -155,17 +144,11 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
}
pContent = pTarget->getNativeElement() ;
- //MM : end
if( pContent == NULL ) {
throw XMLEncryptionException() ;
}
- /* MM : remove the following 2 lines
- xmlUnlinkNode(pContent);
- xmlAddNextSibling(pEncryptedData, pContent);
- */
-
//remember the position of the element to be signed
sal_Bool isParentRef = sal_True;
xmlNodePtr pParent = pEncryptedData->parent;
@@ -201,32 +184,6 @@ SAL_CALL XMLEncryption_NssImpl :: encrypt(
pEncryptedData = pTemplate->getNativeElement() ;
//Find the element to be encrypted.
- /* MM : remove the old method to get the target element
- //This element is wrapped in the CipherValue sub-element.
- xmlNodePtr pCipherData = pEncryptedData->children;
- while (pCipherData != NULL && stricmp((const char *)(pCipherData->name), "CipherData"))
- {
- pCipherData = pCipherData->next;
- }
-
- if( pCipherData == NULL ) {
- xmlSecEncCtxDestroy( pEncCtx ) ;
- throw XMLEncryptionException() ;
- }
-
- xmlNodePtr pCipherValue = pCipherData->children;
- while (pCipherValue != NULL && stricmp((const char *)(pCipherValue->name), "CipherValue"))
- {
- pCipherValue = pCipherValue->next;
- }
-
- if( pCipherValue == NULL ) {
- xmlSecEncCtxDestroy( pEncCtx ) ;
- throw XMLEncryptionException() ;
- }
-
- pContent = pCipherValue->children;
- */
//Encrypt the template
if( xmlSecEncCtxXmlEncrypt( pEncCtx , pEncryptedData , pContent ) < 0 )
@@ -404,12 +361,12 @@ Sequence< OUString > SAL_CALL XMLEncryption_NssImpl :: getSupportedServiceNames(
Sequence< OUString > XMLEncryption_NssImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLEncryption" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryption")) ;
return seqServiceNames ;
}
OUString XMLEncryption_NssImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl")) ;
}
//Helper for registry
@@ -424,3 +381,4 @@ Reference< XSingleServiceFactory > XMLEncryption_NssImpl :: impl_createFactory(
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx
index 42484532fcae..1b859734db39 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/crypto/XXMLEncryption.hpp>
#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
@@ -100,3 +97,4 @@ class XMLEncryption_NssImpl : public ::cppu::WeakImplHelper3<
#endif // _XMLENCRYPTION_NSSIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index ca881d0ee92b..f0dd15c75fac 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#include <rtl/uuid.h>
#include "securityenvironment_nssimpl.hxx"
-#ifndef _XMLSECURITYCONTEXT_NSSIMPL_HXX_
#include "xmlsecuritycontext_nssimpl.hxx"
-#endif
#include "xmlstreamio.hxx"
#include <sal/types.h>
@@ -80,11 +79,7 @@ XMLSecurityContext_NssImpl :: XMLSecurityContext_NssImpl( const Reference< XMult
}
XMLSecurityContext_NssImpl :: ~XMLSecurityContext_NssImpl() {
-#if 0 //i39448
- if( m_pKeysMngr != NULL ) {
- xmlSecKeysMngrDestroy( m_pKeysMngr ) ;
- }
-#endif
+ //i39448
xmlDisableStreamInputCallbacks() ;
xmlSecCryptoShutdown() ;
@@ -151,86 +146,7 @@ void SAL_CALL XMLSecurityContext_NssImpl::setDefaultSecurityEnvironmentIndex( sa
m_nDefaultEnvIndex = nDefaultEnvIndex;
}
-#if 0 //i39448 : old methods should be deleted
-/* XXMLSecurityContext */
-void SAL_CALL XMLSecurityContext_NssImpl :: setSecurityEnvironment( const Reference< XSecurityEnvironment >& aSecurityEnvironment ) throw( com::sun::star::security::SecurityInfrastructureException ) {
- PK11SlotInfo* slot ;
- CERTCertDBHandle* handler ;
- //xmlSecKeyPtr key ;
- //xmlSecKeyDataPtr keyData ;
- PK11SymKey* symKey ;
- SECKEYPublicKey* pubKey ;
- SECKEYPrivateKey* priKey ;
- unsigned int i ;
-
- if( !aSecurityEnvironment.is() )
- throw RuntimeException() ;
-
- m_xSecurityEnvironment = aSecurityEnvironment ;
-
- //Clear key manager
- if( m_pKeysMngr != NULL ) {
- xmlSecKeysMngrDestroy( m_pKeysMngr ) ;
- m_pKeysMngr = NULL ;
- }
-
- //Create key manager
- Reference< XUnoTunnel > xEnvTunnel( m_xSecurityEnvironment , UNO_QUERY ) ;
- if( !xEnvTunnel.is() ) {
- throw RuntimeException() ;^1
- }
-
- SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xEnvTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ;
- if( pSecEnv == NULL )
- throw RuntimeException() ;
-
- //todo
-// slot = pSecEnv->getCryptoSlot() ;
- handler = pSecEnv->getCertDb() ;
-
- /*-
- * The following lines is based on the private version of xmlSec-NSS
- * crypto engine
- */
- m_pKeysMngr = xmlSecNssAppliedKeysMngrCreate( slot , handler ) ;
- if( m_pKeysMngr == NULL )
- throw RuntimeException() ;
-
- /*-
- * Adopt symmetric key into keys manager
- */
- for( i = 0 ; ( symKey = pSecEnv->getSymKey( i ) ) != NULL ; i ++ ) {
- if( xmlSecNssAppliedKeysMngrSymKeyLoad( m_pKeysMngr, symKey ) < 0 ) {
- throw RuntimeException() ;
- }
- }
-
- /*-
- * Adopt asymmetric public key into keys manager
- */
- for( i = 0 ; ( pubKey = pSecEnv->getPubKey( i ) ) != NULL ; i ++ ) {
- if( xmlSecNssAppliedKeysMngrPubKeyLoad( m_pKeysMngr, pubKey ) < 0 ) {
- throw RuntimeException() ;
- }
- }
-
- /*-
- * Adopt asymmetric private key into keys manager
- */
- for( i = 0 ; ( priKey = pSecEnv->getPriKey( i ) ) != NULL ; i ++ ) {
- if( xmlSecNssAppliedKeysMngrPriKeyLoad( m_pKeysMngr, priKey ) < 0 ) {
- throw RuntimeException() ;
- }
- }
-}
-
-/* XXMLSecurityContext */
-Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContext_NssImpl :: getSecurityEnvironment()
- throw (RuntimeException)
-{
- return m_xSecurityEnvironment ;
-}
-#endif
+//i39448 : old methods deleted
/* XInitialization */
@@ -263,12 +179,12 @@ Sequence< OUString > SAL_CALL XMLSecurityContext_NssImpl :: getSupportedServiceN
Sequence< OUString > XMLSecurityContext_NssImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSecurityContext" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSecurityContext")) ;
return seqServiceNames ;
}
OUString XMLSecurityContext_NssImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")) ;
}
//Helper for registry
@@ -283,43 +199,5 @@ Reference< XSingleServiceFactory > XMLSecurityContext_NssImpl :: impl_createFact
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
-#if 0 //not useful any longer
-/* XUnoTunnel */
-sal_Int64 SAL_CALL XMLSecurityContext_NssImpl :: getSomething( const Sequence< sal_Int8 >& aIdentifier )
-throw (RuntimeException)
-{
- if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) {
- return ( sal_Int64 )this ;
- }
- return 0 ;
-}
-/* XUnoTunnel extension */
-const Sequence< sal_Int8>& XMLSecurityContext_NssImpl :: getUnoTunnelId() {
- static Sequence< sal_Int8 >* pSeq = 0 ;
- if( !pSeq ) {
- ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
- if( !pSeq ) {
- static Sequence< sal_Int8> aSeq( 16 ) ;
- rtl_createUuid( ( sal_uInt8* )aSeq.getArray() , 0 , sal_True ) ;
- pSeq = &aSeq ;
- }
- }
- return *pSeq ;
-}
-
-/* XUnoTunnel extension */
-XMLSecurityContext_NssImpl* XMLSecurityContext_NssImpl :: getImplementation( const Reference< XInterface > xObj ) {
- Reference< XUnoTunnel > xUT( xObj , UNO_QUERY ) ;
- if( xUT.is() ) {
- return ( XMLSecurityContext_NssImpl* )xUT->getSomething( getUnoTunnelId() ) ;
- } else
- return NULL ;
-}
-
-/* Native methods */
-xmlSecKeysMngrPtr XMLSecurityContext_NssImpl :: keysManager() throw( Exception, RuntimeException ) {
- return m_pKeysMngr ;
-}
-
-#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx
index b75f2d0c0c72..685f83ec304d 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
@@ -137,3 +134,4 @@ class XMLSecurityContext_NssImpl : public ::cppu::WeakImplHelper3<
#endif // _XMLSIGNATURECONTEXT_NSSIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 5f03b54580df..47e20b7af03b 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,21 +32,13 @@
#include <rtl/uuid.h>
#include "xmlsignature_nssimpl.hxx"
-#ifndef _XMLDOCUMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmldocumentwrapper_xmlsecimpl.hxx"
-#endif
-#ifndef _XMLELEMENTWRAPPER_XMLSECIMPL_HXX_
#include "xmlelementwrapper_xmlsecimpl.hxx"
-#endif
-#ifndef _SECURITYENVIRONMENT_NSSIMPL_HXX_
#include "securityenvironment_nssimpl.hxx"
-#endif
-#ifndef _XMLSECURITYCONTEXT_NSSIMPL_HXX_
#include "xmlsecuritycontext_nssimpl.hxx"
-#endif
#include "xmlstreamio.hxx"
#include "errorcallback.hxx"
@@ -133,11 +126,7 @@ SAL_CALL XMLSignature_NssImpl :: generate(
throw RuntimeException() ;
}
-#if 0 //i39448 : the key manager should be retrieved from SecurityEnvironment, instead of SecurityContext
- XMLSecurityContext_NssImpl* pSecCtxt = ( XMLSecurityContext_NssImpl* )xSecTunnel->getSomething( XMLSecurityContext_NssImpl::getUnoTunnelId() ) ;
- if( pSecCtxt == NULL )
- throw RuntimeException() ;
-#endif
+ //i39448 : the key manager should be retrieved from SecurityEnvironment, instead of SecurityContext
SecurityEnvironment_NssImpl* pSecEnv =
reinterpret_cast<SecurityEnvironment_NssImpl*>(
@@ -332,12 +321,12 @@ Sequence< OUString > SAL_CALL XMLSignature_NssImpl :: getSupportedServiceNames()
Sequence< OUString > XMLSignature_NssImpl :: impl_getSupportedServiceNames() {
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ) ;
Sequence< OUString > seqServiceNames( 1 ) ;
- seqServiceNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignature" ) ;
+ seqServiceNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignature")) ;
return seqServiceNames ;
}
OUString XMLSignature_NssImpl :: impl_getImplementationName() throw( RuntimeException ) {
- return OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl" ) ;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl")) ;
}
//Helper for registry
@@ -352,3 +341,4 @@ Reference< XSingleServiceFactory > XMLSignature_NssImpl :: impl_createFactory( c
return ::cppu::createSingleFactory( aServiceManager , impl_getImplementationName() , impl_createInstance , impl_getSupportedServiceNames() ) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx
index 44ed88b0a1bf..3a8cfecd4eb0 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,14 +35,10 @@
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
@@ -100,3 +97,4 @@ class XMLSignature_NssImpl : public ::cppu::WeakImplHelper3<
#endif // _XMLSIGNATURE_NSSIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
index 03d32451759c..171c7bc365a3 100644
--- a/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xsec_nss.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,4 @@ void* SAL_CALL nss_component_getFactory( const sal_Char* pImplName , void* pServ
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 6e381334136e..6b09fea26718 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -431,20 +432,6 @@ void SAXHelper::setDocumentLocator(
const cssu::Reference< cssxs::XLocator > &)
throw( cssxs::SAXException , cssu::RuntimeException )
{
- //--Pseudo code if necessary
- //--m_pSaxLocator is a member defined as xmlSAXHabdlerPtr
- //--m_pSaxLocatorHdl is a member defined as Sax_Locator
-
- //if( m_pSaxLocator != NULL ) {
- // //Deallocate the memory
- //}
- //if( m_pSaxLocatorHdl != NULL ) {
- // //Deallocate the memory
- //}
-
- //m_pSaxLocatorHdl = new Sax_Locator( xLocator ) ;
- //m_pSaxLocator = { m_pSaxLocatorHdl->getPublicId , m_pSaxLocatorHdl->getSystemId , m_pSaxLocatorHdl->getLineNumber , m_pSaxLocatorHdl->getColumnNumber } ;
-
- //m_pSaxHandler->setDocumentLocator( m_pParserCtxt , m_pSaxLocator ) ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/saxhelper.hxx b/xmlsecurity/source/xmlsec/saxhelper.hxx
index fab6157b6922..a18943d5043e 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.hxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ class SAXHelper
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index 341f66b9ef1f..987a76dff9fb 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,16 +35,10 @@
#include <xmloff/attrlist.hxx>
#include "xmlelementwrapper_xmlsecimpl.hxx"
-//#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/*
- * Deleted by AF
-#include <memory.h>
- */
-
#include <sys/types.h>
#include <sys/stat.h>
@@ -128,9 +123,6 @@ void XMLDocumentWrapper_XmlSecImpl::getNextSAXEvent()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -226,9 +218,6 @@ void XMLDocumentWrapper_XmlSecImpl::sendStartElement(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -330,9 +319,6 @@ void XMLDocumentWrapper_XmlSecImpl::sendEndElement(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -381,9 +367,6 @@ void XMLDocumentWrapper_XmlSecImpl::sendNode(
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -433,9 +416,6 @@ rtl::OString XMLDocumentWrapper_XmlSecImpl::getNodeQName(const xmlNodePtr pNode)
* RESULT
* name - the node's qualified name
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -475,9 +455,6 @@ xmlNodePtr XMLDocumentWrapper_XmlSecImpl::checkElement( const cssu::Reference< c
* RESULT
* node - the node wrapped in the XXMLElementWrapper interface
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -546,9 +523,6 @@ sal_Int32 XMLDocumentWrapper_XmlSecImpl::recursiveDelete(
* The node in the m_aReservedNodes list must be in the tree order, otherwise
* the result is unpredictable.
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -626,9 +600,6 @@ void XMLDocumentWrapper_XmlSecImpl::getNextReservedNode()
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -663,9 +634,6 @@ void XMLDocumentWrapper_XmlSecImpl::removeNode(const xmlNodePtr pNode) const
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -708,9 +676,6 @@ void XMLDocumentWrapper_XmlSecImpl::buildIDAttr(xmlNodePtr pNode) const
* RESULT
* empty
*
- * HISTORY
- * 14.06.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -747,9 +712,6 @@ void XMLDocumentWrapper_XmlSecImpl::rebuildIDLink(xmlNodePtr pNode) const
* RESULT
* empty
*
- * HISTORY
- * 14.06.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -1151,3 +1113,4 @@ cssu::Sequence< rtl::OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl::getSuppo
return XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx
index d2051fcf1406..de4f5cb25769 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,8 +36,6 @@
#include <cppuhelper/implbase4.hxx>
#include "saxhelper.hxx"
-//#include "libxml/parserInternals.h"
-//#include "libxslt/xslt.h"
#define NODEPOSITION_NORMAL 1
#define NODEPOSITION_STARTELEMENT 2
@@ -61,11 +60,6 @@ class XMLDocumentWrapper_XmlSecImpl : public cppu::WeakImplHelper4
* Converts SAX events into a libxml2 document, converts the document back
* into SAX event stream, and manipulate nodes in the document.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XXMLDocumentWrapper,
- * XDocumentHandler, XCompressedDocumentHandler,
- * XServiceInfo
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -282,3 +276,4 @@ SAL_CALL XMLDocumentWrapper_XmlSecImpl_createInstance(
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
index f9de04c16d5f..cc00a33f1bdb 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,9 +146,6 @@ xmlNodePtr XMLElementWrapper_XmlSecImpl::getNativeElement( ) const
* RESULT
* pNode - the libxml2 node wrapped by this object
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -174,9 +172,6 @@ void XMLElementWrapper_XmlSecImpl::setNativeElement(const xmlNodePtr pNode)
* RESULT
* empty
*
- * HISTORY
- * 05.01.2004 - implemented
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -185,3 +180,4 @@ void XMLElementWrapper_XmlSecImpl::setNativeElement(const xmlNodePtr pNode)
m_pElement = pNode;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
index e90513266ec5..02a97be563d9 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,10 +52,6 @@ class XMLElementWrapper_XmlSecImpl : public cppu::WeakImplHelper3
* Used as a wrapper class to transfer a libxml2 node structure
* between different UNO components.
*
- * HISTORY
- * 05.01.2004 - Interface supported: XXMLElementWrapper, XUnoTunnel
- * XServiceInfo
- *
* AUTHOR
* Michael Mi
* Email: michael.mi@sun.com
@@ -106,3 +103,4 @@ SAL_CALL XMLElementWrapper_XmlSecImpl_createInstance(
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index d5ba439467fe..b75083e5e022 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -163,19 +164,8 @@ int xmlStreamClose( void * context )
int xmlEnableStreamInputCallbacks()
{
- int cbs = 0 ;
if( !( enableXmlStreamIO & XMLSTREAMIO_INITIALIZED ) ) {
- //Register the callbacks into libxml2
- //cbs = xmlRegisterInputCallbacks(
- // xmlStreamMatch,
- // xmlStreamOpen,
- // xmlStreamRead,
- // xmlStreamClose ) ;
- //if( cbs < 0 ) {
- // return -1 ;
- //}
-
//Register the callbacks into xmlSec
//In order to make the xmlsec io finding the callbacks firstly,
//I put the callbacks at the very begining.
@@ -185,7 +175,7 @@ int xmlEnableStreamInputCallbacks()
xmlSecIOCleanupCallbacks() ;
//Register my classbacks.
- cbs = xmlSecIORegisterCallbacks(
+ int cbs = xmlSecIORegisterCallbacks(
xmlStreamMatch,
xmlStreamOpen,
xmlStreamRead,
@@ -242,3 +232,4 @@ void xmlDisableStreamInputCallbacks() {
enableXmlStreamIO &= ~XMLSTREAMIO_INITIALIZED ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.hxx b/xmlsecurity/source/xmlsec/xmlstreamio.hxx
index 3cb2e33528ab..eb61e9897606 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.hxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _XMLSTREAMIO_XMLSECIMPL_HXX_
#define _XMLSTREAMIO_XMLSECIMPL_HXX_
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.hxx>
-#endif
#include <com/sun/star/xml/crypto/XUriBinding.hpp>
int xmlEnableStreamInputCallbacks( void ) ;
@@ -44,3 +43,4 @@ int xmlUnregisterStreamInputCallbacks( void ) ;
#endif //_XMLSTREAMIO_XMLSECIMPL_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
index 3fba8c69820f..7d09ac0af1dd 100644
--- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
+++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -154,3 +155,4 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName , void* pServiceM
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/test_docs/documents/aia_ca_issuers.odt b/xmlsecurity/test_docs/documents/aia_ca_issuers.odt
index 8c34889df75d..8c34889df75d 100755..100644
--- a/xmlsecurity/test_docs/documents/aia_ca_issuers.odt
+++ b/xmlsecurity/test_docs/documents/aia_ca_issuers.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/aia_ocsp.odt b/xmlsecurity/test_docs/documents/aia_ocsp.odt
index 6a1b48c6ae44..6a1b48c6ae44 100755..100644
--- a/xmlsecurity/test_docs/documents/aia_ocsp.odt
+++ b/xmlsecurity/test_docs/documents/aia_ocsp.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/aia_ocsp_revoked_chain.odt b/xmlsecurity/test_docs/documents/aia_ocsp_revoked_chain.odt
index 248fcceddc43..248fcceddc43 100755..100644
--- a/xmlsecurity/test_docs/documents/aia_ocsp_revoked_chain.odt
+++ b/xmlsecurity/test_docs/documents/aia_ocsp_revoked_chain.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf.odt b/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf.odt
index 2e0dbd6f7af3..2e0dbd6f7af3 100755..100644
--- a/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf.odt
+++ b/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf_chain.odt b/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf_chain.odt
index 3519e4a818e6..3519e4a818e6 100755..100644
--- a/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf_chain.odt
+++ b/xmlsecurity/test_docs/documents/aia_ocsp_revoked_leaf_chain.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crl.odt b/xmlsecurity/test_docs/documents/crl.odt
index 06e412fa3ca4..06e412fa3ca4 100755..100644
--- a/xmlsecurity/test_docs/documents/crl.odt
+++ b/xmlsecurity/test_docs/documents/crl.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crl_revoked_chain.odt b/xmlsecurity/test_docs/documents/crl_revoked_chain.odt
index 851fc87e7693..851fc87e7693 100755..100644
--- a/xmlsecurity/test_docs/documents/crl_revoked_chain.odt
+++ b/xmlsecurity/test_docs/documents/crl_revoked_chain.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crl_revoked_leaf.odt b/xmlsecurity/test_docs/documents/crl_revoked_leaf.odt
index a97598d554bd..a97598d554bd 100755..100644
--- a/xmlsecurity/test_docs/documents/crl_revoked_leaf.odt
+++ b/xmlsecurity/test_docs/documents/crl_revoked_leaf.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crl_revoked_leaf_chain.odt b/xmlsecurity/test_docs/documents/crl_revoked_leaf_chain.odt
index f82a02a4545c..f82a02a4545c 100755..100644
--- a/xmlsecurity/test_docs/documents/crl_revoked_leaf_chain.odt
+++ b/xmlsecurity/test_docs/documents/crl_revoked_leaf_chain.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crldp.odt b/xmlsecurity/test_docs/documents/crldp.odt
index 5cbf289de34f..5cbf289de34f 100755..100644
--- a/xmlsecurity/test_docs/documents/crldp.odt
+++ b/xmlsecurity/test_docs/documents/crldp.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crldp_no_intermediate_ca_revocation_info.odt b/xmlsecurity/test_docs/documents/crldp_no_intermediate_ca_revocation_info.odt
index 20c28d9252e7..20c28d9252e7 100755..100644
--- a/xmlsecurity/test_docs/documents/crldp_no_intermediate_ca_revocation_info.odt
+++ b/xmlsecurity/test_docs/documents/crldp_no_intermediate_ca_revocation_info.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crldp_no_root_revocation_info.odt b/xmlsecurity/test_docs/documents/crldp_no_root_revocation_info.odt
index d3f59e6015a1..d3f59e6015a1 100755..100644
--- a/xmlsecurity/test_docs/documents/crldp_no_root_revocation_info.odt
+++ b/xmlsecurity/test_docs/documents/crldp_no_root_revocation_info.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crldp_revoked_chain.odt b/xmlsecurity/test_docs/documents/crldp_revoked_chain.odt
index 8c6416b808ba..8c6416b808ba 100755..100644
--- a/xmlsecurity/test_docs/documents/crldp_revoked_chain.odt
+++ b/xmlsecurity/test_docs/documents/crldp_revoked_chain.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crldp_revoked_leaf.odt b/xmlsecurity/test_docs/documents/crldp_revoked_leaf.odt
index fce479cc66b2..fce479cc66b2 100755..100644
--- a/xmlsecurity/test_docs/documents/crldp_revoked_leaf.odt
+++ b/xmlsecurity/test_docs/documents/crldp_revoked_leaf.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/crldp_revoked_leaf_chain.odt b/xmlsecurity/test_docs/documents/crldp_revoked_leaf_chain.odt
index 53d1e01e7ae3..53d1e01e7ae3 100755..100644
--- a/xmlsecurity/test_docs/documents/crldp_revoked_leaf_chain.odt
+++ b/xmlsecurity/test_docs/documents/crldp_revoked_leaf_chain.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/dn_cyrillic_bmpstring.odt b/xmlsecurity/test_docs/documents/dn_cyrillic_bmpstring.odt
index 1f69a324823b..1f69a324823b 100755..100644
--- a/xmlsecurity/test_docs/documents/dn_cyrillic_bmpstring.odt
+++ b/xmlsecurity/test_docs/documents/dn_cyrillic_bmpstring.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/dn_latin_ext_greak_bmpstring.odt b/xmlsecurity/test_docs/documents/dn_latin_ext_greak_bmpstring.odt
index 53a29310e9f2..53a29310e9f2 100755..100644
--- a/xmlsecurity/test_docs/documents/dn_latin_ext_greak_bmpstring.odt
+++ b/xmlsecurity/test_docs/documents/dn_latin_ext_greak_bmpstring.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/dn_multivalue_rdn.odt b/xmlsecurity/test_docs/documents/dn_multivalue_rdn.odt
index 4d34bc0f580a..4d34bc0f580a 100755..100644
--- a/xmlsecurity/test_docs/documents/dn_multivalue_rdn.odt
+++ b/xmlsecurity/test_docs/documents/dn_multivalue_rdn.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/dn_quoting.odt b/xmlsecurity/test_docs/documents/dn_quoting.odt
index ca17f6aab62e..ca17f6aab62e 100755..100644
--- a/xmlsecurity/test_docs/documents/dn_quoting.odt
+++ b/xmlsecurity/test_docs/documents/dn_quoting.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odt b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odt
index 798f25a35312..798f25a35312 100755..100644
--- a/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odt
+++ b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odt b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odt
index 591f9aa4d63d..591f9aa4d63d 100755..100644
--- a/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odt
+++ b/xmlsecurity/test_docs/documents/dn_single_multivalue_rdn_with_quoting.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/incomplete_path.odt b/xmlsecurity/test_docs/documents/incomplete_path.odt
index cb0763b0a124..cb0763b0a124 100755..100644
--- a/xmlsecurity/test_docs/documents/incomplete_path.odt
+++ b/xmlsecurity/test_docs/documents/incomplete_path.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc1.odt b/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc1.odt
index f0555b1a2da4..f0555b1a2da4 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc1.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc1.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc2.odt b/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc2.odt
index b2e24fc6177c..b2e24fc6177c 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc2.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo2_x_doc2.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro1.odt b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro1.odt
index 640a80dced51..640a80dced51 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro1.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro1.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro2.odt b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro2.odt
index 35847216be74..35847216be74 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro2.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro2.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro3.odt b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro3.odt
index 575f3a12d084..575f3a12d084 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro3.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro3.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro4.odt b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro4.odt
index 75a417cab6f7..75a417cab6f7 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro4.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro4.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro5.odt b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro5.odt
index f7d71762fd88..f7d71762fd88 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro5.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo2_x_macro5.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc1.odt b/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc1.odt
index 9984aa1bbb27..9984aa1bbb27 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc1.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc1.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc3.odt b/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc3.odt
index 5ad7b68abbbb..5ad7b68abbbb 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc3.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc3.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc4.odt b/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc4.odt
index d126a8dff529..d126a8dff529 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc4.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo3_2_doc4.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/invalid_ooo_3_2_doc2.odt b/xmlsecurity/test_docs/documents/invalid_ooo_3_2_doc2.odt
index dd475c354957..dd475c354957 100755..100644
--- a/xmlsecurity/test_docs/documents/invalid_ooo_3_2_doc2.odt
+++ b/xmlsecurity/test_docs/documents/invalid_ooo_3_2_doc2.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/ocsp_crl.odt b/xmlsecurity/test_docs/documents/ocsp_crl.odt
index f8ab95c046de..f8ab95c046de 100755..100644
--- a/xmlsecurity/test_docs/documents/ocsp_crl.odt
+++ b/xmlsecurity/test_docs/documents/ocsp_crl.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/ocsp_crl_revoked_leaf.odt b/xmlsecurity/test_docs/documents/ocsp_crl_revoked_leaf.odt
index 4d7c5cd8094d..4d7c5cd8094d 100755..100644
--- a/xmlsecurity/test_docs/documents/ocsp_crl_revoked_leaf.odt
+++ b/xmlsecurity/test_docs/documents/ocsp_crl_revoked_leaf.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/stateOrProvinceName.odt b/xmlsecurity/test_docs/documents/stateOrProvinceName.odt
index 0979ae5a9d86..0979ae5a9d86 100755..100644
--- a/xmlsecurity/test_docs/documents/stateOrProvinceName.odt
+++ b/xmlsecurity/test_docs/documents/stateOrProvinceName.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_no_revocation.odt b/xmlsecurity/test_docs/documents/valid_no_revocation.odt
index f7c9bbf5ed40..f7c9bbf5ed40 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_no_revocation.odt
+++ b/xmlsecurity/test_docs/documents/valid_no_revocation.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_no_root_revocation_info.odt b/xmlsecurity/test_docs/documents/valid_no_root_revocation_info.odt
index d26eb58f025c..d26eb58f025c 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_no_root_revocation_info.odt
+++ b/xmlsecurity/test_docs/documents/valid_no_root_revocation_info.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_no_sub_ca_revocation_info.odt b/xmlsecurity/test_docs/documents/valid_no_sub_ca_revocation_info.odt
index 5d6c053c2b7c..5d6c053c2b7c 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_no_sub_ca_revocation_info.odt
+++ b/xmlsecurity/test_docs/documents/valid_no_sub_ca_revocation_info.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo2_x_doc1.odt b/xmlsecurity/test_docs/documents/valid_ooo2_x_doc1.odt
index cb6401c1641f..cb6401c1641f 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo2_x_doc1.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo2_x_doc1.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_macro.odt b/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_macro.odt
index 09b63b40a3e0..09b63b40a3e0 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_macro.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_macro.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_unsigned_macro.odt b/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_unsigned_macro.odt
index e810d785d1b1..e810d785d1b1 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_unsigned_macro.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo2_x_doc_unsigned_macro.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo3_0_doc1.odt b/xmlsecurity/test_docs/documents/valid_ooo3_0_doc1.odt
index 6c2bbd045a0e..6c2bbd045a0e 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo3_0_doc1.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo3_0_doc1.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_macro.odt b/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_macro.odt
index b8b036cc8fa7..b8b036cc8fa7 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_macro.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_macro.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_unsigned_macro.odt b/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_unsigned_macro.odt
index 6ba0ec52a9b7..6ba0ec52a9b7 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_unsigned_macro.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo3_0_doc_unsigned_macro.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo3_2_doc1.odt b/xmlsecurity/test_docs/documents/valid_ooo3_2_doc1.odt
index de1c635c198b..de1c635c198b 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo3_2_doc1.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo3_2_doc1.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_macro.odt b/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_macro.odt
index f6575ec88578..f6575ec88578 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_macro.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_macro.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_unsigned_macro.odt b/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_unsigned_macro.odt
index 41f676f6376e..41f676f6376e 100755..100644
--- a/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_unsigned_macro.odt
+++ b/xmlsecurity/test_docs/documents/valid_ooo3_2_doc_unsigned_macro.odt
Binary files differ
diff --git a/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java b/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java
index c67e41549c5f..0881ff5e13e3 100755
--- a/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java
+++ b/xmlsecurity/test_docs/tools/httpserv/src/httpserv/Main.java
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: WeakReference.java,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/xmlsecurity/tools/demo/mozprofile.cxx b/xmlsecurity/tools/demo/mozprofile.cxx
index 928e84fd61bb..4c08e3a82e5a 100644
--- a/xmlsecurity/tools/demo/mozprofile.cxx
+++ b/xmlsecurity/tools/demo/mozprofile.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,4 @@ int SAL_CALL main( int argc, char **argv )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/demo/multisigdemo.cxx b/xmlsecurity/tools/demo/multisigdemo.cxx
index ff8142f9252d..356616451ed6 100644
--- a/xmlsecurity/tools/demo/multisigdemo.cxx
+++ b/xmlsecurity/tools/demo/multisigdemo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -234,3 +235,5 @@ int SAL_CALL main( int argc, char **argv )
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/demo/performance.cxx b/xmlsecurity/tools/demo/performance.cxx
index 061091611de7..1f8fc042fb6f 100644
--- a/xmlsecurity/tools/demo/performance.cxx
+++ b/xmlsecurity/tools/demo/performance.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmlsecurity.hxx"
-#include <stdio.h>
-#include <string.h>
-
#include <rtl/ustring.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/servicefactory.hxx>
@@ -60,7 +58,6 @@
#include <com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.hpp>
#include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
-#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.hpp>
#include <com/sun/star/xml/csax/XMLAttribute.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
#include <com/sun/star/xml/crypto/SecurityOperationStatus.hpp>
@@ -79,23 +76,15 @@
#include <xmloff/attrlist.hxx>
-//#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/*
- * Can not build under solaris.
- * Delete the memory.h including by AF
-#include <memory.h>
-*/
-
#include <sys/types.h>
#include <sys/stat.h>
#include <osl/time.h>
-
#ifndef INCLUDED_VECTOR
#include <vector>
#define INCLUDED_VECTOR
@@ -476,16 +465,16 @@ rtl::OUString XSecTester::parseFile(
if (bIsJavaBased)
{
- SEInitializer_comp = rtl::OUString::createFromAscii( SEINITIALIZER_JAVA_COMPONENT );
- XMLSignature_comp = rtl::OUString::createFromAscii( XMLSIGNATURE_JAVA_COMPONENT);
- m_ouXMLDocumentWrapperComponentName = rtl::OUString::createFromAscii( XMLDOCUMENTWRAPPER_JAVA_COMPONENT );
+ SEInitializer_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_JAVA_COMPONENT ));
+ XMLSignature_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_JAVA_COMPONENT));
+ m_ouXMLDocumentWrapperComponentName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENTWRAPPER_JAVA_COMPONENT ));
tokenPath = m_ouJavaCryptokenDir;
}
else
{
- SEInitializer_comp = rtl::OUString::createFromAscii( SEINITIALIZER_C_COMPONENT );
- XMLSignature_comp = rtl::OUString::createFromAscii( XMLSIGNATURE_C_COMPONENT);
- m_ouXMLDocumentWrapperComponentName = rtl::OUString::createFromAscii( XMLDOCUMENT_C_COMPONENT );
+ SEInitializer_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_C_COMPONENT ));
+ XMLSignature_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_C_COMPONENT));
+ m_ouXMLDocumentWrapperComponentName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENT_C_COMPONENT ));
tokenPath = m_ouCCryptokenDir;
}
@@ -591,13 +580,13 @@ rtl::OUString XSecTester::parseFile(
}
else
{
- ouMessage += rtl::OUString::createFromAscii( "N/A" );
+ ouMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("N/A"));
}
}
else
{
- ouMessage += rtl::OUString::createFromAscii( "-" );
+ ouMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
}
return ouMessage;
@@ -743,7 +732,7 @@ rtl::OUString SAL_CALL XSecTester::transfer_without_sec(
xJavaFilterParser, cssu::UNO_QUERY );
if ( !xJavaFilterParser.is() )
- return rtl::OUString::createFromAscii( "NO JAVA" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO JAVA"));
/* connect the SAX Parser, the Java Flat Filter and the SAX Writer */
xJavaFilterParser->setDocumentHandler( xSaxWriterHandler );
@@ -897,7 +886,7 @@ SignatureEntity::SignatureEntity(
m_xSAXEventKeeper->setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId);
m_xReferenceListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
- mxMSF->createInstance( rtl::OUString::createFromAscii( SIGNATURECREATOR_COMPONENT )),
+ mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATURECREATOR_COMPONENT ))),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(m_xReferenceListener, cssu::UNO_QUERY);
@@ -936,7 +925,7 @@ SignatureEntity::SignatureEntity(
m_xSAXEventKeeper->setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId);
m_xReferenceListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >(
- mxMSF->createInstance( rtl::OUString::createFromAscii( SIGNATUREVERIFIER_COMPONENT )),
+ mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATUREVERIFIER_COMPONENT ))),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(m_xReferenceListener, cssu::UNO_QUERY);
@@ -1193,7 +1182,7 @@ bool XSecTester::foundSecurityRelated()
cssu::UNO_QUERY);
m_xSAXEventKeeper = cssu::Reference< cssxc::sax::XSecuritySAXEventKeeper >
- (mxMSF->createInstance( rtl::OUString::createFromAscii( SAXEVENTKEEPER_COMPONENT )),
+ (mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SAXEVENTKEEPER_COMPONENT ))),
cssu::UNO_QUERY);
cssu::Reference<cssl::XInitialization> xInitialization(m_xSAXEventKeeper, cssu::UNO_QUERY);
@@ -1291,9 +1280,9 @@ void XSecTester::findKeyOrReference(SecurityEntity* pSecurityEntity, const rtl::
{
(*ii_referenceRefNums) = nRefNum;
- ii_referenceURIs++;
- ii_referenceKeeperIds++;
- ii_referenceRefNums++;
+ ++ii_referenceURIs;
+ ++ii_referenceKeeperIds;
+ ++ii_referenceRefNums;
}
if (bIsFindingKey)
@@ -1303,9 +1292,9 @@ void XSecTester::findKeyOrReference(SecurityEntity* pSecurityEntity, const rtl::
}
else
{
- ii_referenceURIs++;
- ii_referenceKeeperIds++;
- ii_referenceRefNums++;
+ ++ii_referenceURIs;
+ ++ii_referenceKeeperIds;
+ ++ii_referenceRefNums;
}
}
}
@@ -1617,7 +1606,7 @@ std::vector< AncestorEvent* >::const_iterator XSecTester::checkAncestorStartElem
if (next != m_vAncestorEvents.end())
{
- next++;
+ ++next;
}
}
@@ -1644,7 +1633,7 @@ void XSecTester::flushAncestorEvents(
else
{
sendAncestorEndElementEvent((*ii)->ouName, xDocumentHandler);
- ii++;
+ ++ii;
}
}
}
@@ -1779,7 +1768,7 @@ int main( int argc, char **argv )
* export the file with signautre/encryption (C++)
*/
outputFileName1 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-ex.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex.xml"));
ouTime_C = pTester->export_xml(ouInputFileName, outputFileName1, sal_False);
nPosition1 = ouTime_C.lastIndexOf('\t');
ouRemark_C = ouTime_C.copy(nPosition1 + 1);
@@ -1789,7 +1778,7 @@ int main( int argc, char **argv )
* export the file with signautre/encryption (Java)
*/
outputFileName1 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-ex2.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex2.xml"));
ouTime_Java = pTester->export_xml(ouInputFileName, outputFileName1, sal_True);
nPosition1 = ouTime_Java.lastIndexOf('\t');
ouRemark_Java = ouTime_Java.copy(nPosition1 + 1);
@@ -1799,14 +1788,14 @@ int main( int argc, char **argv )
* export the file without signautre/encryption
*/
outputFileName2 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-ex-no.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex-no.xml"));
ouTime_NoSecurity = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_False);
/*
* export the file with Java Flat Filter
*/
outputFileName2 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-ex-jf.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex-jf.xml"));
ouTime_JavaForwardOnly = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_True);
/*
@@ -1829,7 +1818,7 @@ int main( int argc, char **argv )
* import the file with signautre/encryption (C++)
*/
outputFileName1 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-im.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im.xml"));
ouTime_C = pTester->import_xml(ouInputFileName, outputFileName1, sal_False);
nPosition1 = ouTime_C.lastIndexOf('\t');
ouRemark_C = ouTime_C.copy(nPosition1 + 1);
@@ -1839,7 +1828,7 @@ int main( int argc, char **argv )
* import the file with signautre/encryption (Java)
*/
outputFileName1 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-im2.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im2.xml"));
ouTime_Java = pTester->import_xml(ouInputFileName, outputFileName1, sal_True);
nPosition1 = ouTime_Java.lastIndexOf('\t');
ouRemark_Java = ouTime_Java.copy(nPosition1 + 1);
@@ -1849,7 +1838,7 @@ int main( int argc, char **argv )
* import the file without signautre/encryption
*/
outputFileName2 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-im-no.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im-no.xml"));
ouTime_NoSecurity = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_False);
/*
@@ -1857,7 +1846,7 @@ int main( int argc, char **argv )
*/
outputFileName2 = ouInputFileName.copy(0, nPosition) +
- rtl::OUString::createFromAscii("-im-jf.xml");
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im-jf.xml"));
ouTime_JavaForwardOnly = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_True);
/*
@@ -1878,3 +1867,5 @@ int main( int argc, char **argv )
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/demo/signdemo.cxx b/xmlsecurity/tools/demo/signdemo.cxx
index 3cfad147beb3..a3c59345cfba 100644
--- a/xmlsecurity/tools/demo/signdemo.cxx
+++ b/xmlsecurity/tools/demo/signdemo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -155,3 +156,4 @@ int SAL_CALL main( int argc, char **argv )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/demo/util.cxx b/xmlsecurity/tools/demo/util.cxx
index 5f9fccb9f7d9..ca339bbf5bd1 100644
--- a/xmlsecurity/tools/demo/util.cxx
+++ b/xmlsecurity/tools/demo/util.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,7 +61,7 @@ cssu::Reference< cssl::XMultiServiceFactory > CreateDemoServiceFactory()
"serviceManager - "
"Cannot create simple registry" ) ;
- xSimpleRegistry->open(rtl::OUString::createFromAscii( "demo.rdb" ), sal_True, sal_False);
+ xSimpleRegistry->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("demo.rdb")), sal_True, sal_False);
OSL_ENSURE( xSimpleRegistry->isValid() ,
"serviceManager - "
"Cannot open xml security registry rdb" ) ;
@@ -109,3 +110,5 @@ cssu::Reference< cssl::XMultiServiceFactory > CreateDemoServiceFactory()
return xOutputStream;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/demo/util.hxx b/xmlsecurity/tools/demo/util.hxx
index 7ac5bb69a21a..6f88fd24935f 100644
--- a/xmlsecurity/tools/demo/util.hxx
+++ b/xmlsecurity/tools/demo/util.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ long QueryVerifySignature();
::rtl::OUString getSignatureInformations( const SignatureInformations& SignatureInformations, ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment );
::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment, sal_Bool nType);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/demo/util2.cxx b/xmlsecurity/tools/demo/util2.cxx
index f0115c419aa8..0b68f09c5f89 100644
--- a/xmlsecurity/tools/demo/util2.cxx
+++ b/xmlsecurity/tools/demo/util2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,68 +170,68 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer,
rtl::OUString result;
- result += rtl::OUString::createFromAscii( "Security Id : " )
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Security Id : "))
+rtl::OUString::valueOf(infor.nSecurityId)
- +rtl::OUString::createFromAscii( "\n" );
- result += rtl::OUString::createFromAscii( "Status : [" )
+ +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Status : ["))
+rtl::OUString::valueOf((sal_Int32)(infor.nStatus))
- +rtl::OUString::createFromAscii( "] " )
+ +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("] "))
+rtl::OUString::createFromAscii(status[infor.nStatus])
- +rtl::OUString::createFromAscii( "\n" );
+ +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
const SignatureReferenceInformations& rInfors = infor.vSignatureReferenceInfors;
int i;
int size = rInfors.size();
- result += rtl::OUString::createFromAscii( "--References :\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--References :\n"));
for (i=0; i<size; i++)
{
- result += rtl::OUString::createFromAscii( "---URI : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("---URI : "));
result += rInfors[i].ouURI;
- result += rtl::OUString::createFromAscii( "\n" );
- result += rtl::OUString::createFromAscii( "---DigestValue : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("---DigestValue : "));
result += rInfors[i].ouDigestValue;
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
}
if (infor.ouX509IssuerName.getLength()>0)
{
- result += rtl::OUString::createFromAscii( "--X509IssuerName :\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509IssuerName :\n"));
result += infor.ouX509IssuerName;
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
}
if (infor.ouX509SerialNumber.getLength()>0)
{
- result += rtl::OUString::createFromAscii( "--X509SerialNumber :\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509SerialNumber :\n"));
result += infor.ouX509SerialNumber;
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
}
if (infor.ouX509Certificate.getLength()>0)
{
- result += rtl::OUString::createFromAscii( "--X509Certificate :\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509Certificate :\n"));
result += infor.ouX509Certificate;
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
}
if (infor.ouSignatureValue.getLength()>0)
{
- result += rtl::OUString::createFromAscii( "--SignatureValue :\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--SignatureValue :\n"));
result += infor.ouSignatureValue;
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
}
- result += rtl::OUString::createFromAscii( "--Date :\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--Date :\n"));
::rtl::OUStringBuffer buffer;
convertDateTime( buffer, infor.stDateTime );
result += buffer.makeStringAndClear();
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
if (infor.ouX509IssuerName.getLength()>0 && infor.ouX509SerialNumber.getLength()>0 && xSecurityEnvironment.is())
{
- result += rtl::OUString::createFromAscii( "--Certificate Path :\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--Certificate Path :\n"));
cssu::Reference< ::com::sun::star::security::XCertificate > xCert = xSecurityEnvironment->getCertificate( infor.ouX509IssuerName, numericStringToBigInteger(infor.ouX509SerialNumber) );
cssu::Sequence < cssu::Reference< ::com::sun::star::security::XCertificate > > xCertPath;
if(! xCert.is() )
@@ -246,68 +247,68 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer,
for( int i = 0; i < xCertPath.getLength(); i++ )
{
result += xCertPath[i]->getSubjectName();
- result += rtl::OUString::createFromAscii( "\n Subject public key algorithm : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Subject public key algorithm : "));
result += xCertPath[i]->getSubjectPublicKeyAlgorithm();
- result += rtl::OUString::createFromAscii( "\n Signature algorithm : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Signature algorithm : "));
result += xCertPath[i]->getSignatureAlgorithm();
- result += rtl::OUString::createFromAscii( "\n Subject public key value : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Subject public key value : "));
cssu::Sequence< sal_Int8 > keyValue = xCertPath[i]->getSubjectPublicKeyValue();
result += printHexString(keyValue);
- result += rtl::OUString::createFromAscii( "\n Thumbprint (SHA1) : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Thumbprint (SHA1) : "));
cssu::Sequence< sal_Int8 > SHA1Thumbprint = xCertPath[i]->getSHA1Thumbprint();
result += printHexString(SHA1Thumbprint);
- result += rtl::OUString::createFromAscii( "\n Thumbprint (MD5) : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Thumbprint (MD5) : "));
cssu::Sequence< sal_Int8 > MD5Thumbprint = xCertPath[i]->getMD5Thumbprint();
result += printHexString(MD5Thumbprint);
- result += rtl::OUString::createFromAscii( "\n <<\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n <<\n"));
}
- result += rtl::OUString::createFromAscii( "\n Key Usage : " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Key Usage : "));
sal_Int32 usage = xCert->getCertificateUsage();
if (usage & ::com::sun::star::security::KeyUsage::DIGITAL_SIGNATURE)
{
- result += rtl::OUString::createFromAscii( "DIGITAL_SIGNATURE " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DIGITAL_SIGNATURE "));
}
if (usage & ::com::sun::star::security::KeyUsage::NON_REPUDIATION)
{
- result += rtl::OUString::createFromAscii( "NON_REPUDIATION " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NON_REPUDIATION "));
}
if (usage & ::com::sun::star::security::KeyUsage::KEY_ENCIPHERMENT)
{
- result += rtl::OUString::createFromAscii( "KEY_ENCIPHERMENT " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_ENCIPHERMENT "));
}
if (usage & ::com::sun::star::security::KeyUsage::DATA_ENCIPHERMENT)
{
- result += rtl::OUString::createFromAscii( "DATA_ENCIPHERMENT " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATA_ENCIPHERMENT "));
}
if (usage & ::com::sun::star::security::KeyUsage::KEY_AGREEMENT)
{
- result += rtl::OUString::createFromAscii( "KEY_AGREEMENT " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_AGREEMENT "));
}
if (usage & ::com::sun::star::security::KeyUsage::KEY_CERT_SIGN)
{
- result += rtl::OUString::createFromAscii( "KEY_CERT_SIGN " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_CERT_SIGN "));
}
if (usage & ::com::sun::star::security::KeyUsage::CRL_SIGN)
{
- result += rtl::OUString::createFromAscii( "CRL_SIGN " );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CRL_SIGN "));
}
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
}
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
return result;
}
@@ -325,7 +326,7 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer,
result += getSignatureInformation( infor, xSecurityEnvironment );
}
- result += rtl::OUString::createFromAscii( "\n" );
+ result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
return result;
}
@@ -424,3 +425,5 @@ long QueryVerifySignature()
fscanf( stdin, "%c", &answer);
return (answer == 'n')?0:1;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/demo/verifydemo.cxx b/xmlsecurity/tools/demo/verifydemo.cxx
index 2ea9c8d94a94..d96d539cee10 100644
--- a/xmlsecurity/tools/demo/verifydemo.cxx
+++ b/xmlsecurity/tools/demo/verifydemo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,3 +108,4 @@ int SAL_CALL main( int argc, char **argv )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/csfit/certmngr.cxx b/xmlsecurity/tools/standalone/csfit/certmngr.cxx
index 56dc1b5ae1ae..d0096a9c284e 100644
--- a/xmlsecurity/tools/standalone/csfit/certmngr.cxx
+++ b/xmlsecurity/tools/standalone/csfit/certmngr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,7 +106,7 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[2] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[2] ) ) ;
OSL_ENSURE( xManager.is() ,
"ServicesManager - "
"Cannot get service manager" ) ;
@@ -113,7 +114,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Signer - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -187,3 +188,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/csfit/decrypter.cxx b/xmlsecurity/tools/standalone/csfit/decrypter.cxx
index 9c2422c19bb5..fb65f5fcf098 100644
--- a/xmlsecurity/tools/standalone/csfit/decrypter.cxx
+++ b/xmlsecurity/tools/standalone/csfit/decrypter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,11 +136,11 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[4] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ;
//Create encryption template
Reference< XInterface > tplElement =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( tplElement.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -163,7 +164,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Encryption template
Reference< XInterface > enctpl =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLEncryptionTemplate"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ;
OSL_ENSURE( enctpl.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ;
@@ -179,7 +180,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -206,7 +207,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ;
OSL_ENSURE( xmlsecctx.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -221,7 +222,7 @@ int SAL_CALL main( int argc, char **argv )
//Get encrypter
Reference< XInterface > xmlencrypter =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl")), xContext ) ;
OSL_ENSURE( xmlencrypter.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLEncryption\"" ) ;
@@ -270,3 +271,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/csfit/encrypter.cxx b/xmlsecurity/tools/standalone/csfit/encrypter.cxx
index 37821b6ed54e..63b2b4a6703e 100644
--- a/xmlsecurity/tools/standalone/csfit/encrypter.cxx
+++ b/xmlsecurity/tools/standalone/csfit/encrypter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,11 +144,11 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[6] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[6] ) ) ;
//Create encryption template
Reference< XInterface > tplElement =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( tplElement.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -171,7 +172,7 @@ int SAL_CALL main( int argc, char **argv )
//Create encryption target element
Reference< XInterface > tarElement =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( tarElement.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -196,7 +197,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Encryption template
Reference< XInterface > enctpl =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLEncryptionTemplate"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ;
OSL_ENSURE( enctpl.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ;
@@ -213,7 +214,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -241,7 +242,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ;
OSL_ENSURE( xmlsecctx.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -255,7 +256,7 @@ int SAL_CALL main( int argc, char **argv )
//Get encrypter
Reference< XInterface > xmlencrypter =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl")), xContext ) ;
OSL_ENSURE( xmlencrypter.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLEncryption\"" ) ;
@@ -307,3 +308,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx
index 23c9e5908758..8136b679c6b2 100644
--- a/xmlsecurity/tools/standalone/csfit/helper.cxx
+++ b/xmlsecurity/tools/standalone/csfit/helper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,21 +94,21 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
Reference< XMultiComponentFactory > xUsedServiceManager = NULL ;
Reference< XComponentContext > xUsedComponentContext = NULL ;
- OSL_ENSURE( !sUnoUrl.equalsAscii( "" ) ,
+ OSL_ENSURE( sUnoUrl.getLength() ,
"serviceManager - "
"No uno URI specified" ) ;
- OSL_ENSURE( !sRdbUrl.equalsAscii( "" ) ,
+ OSL_ENSURE( sRdbUrl.getLength() ,
"serviceManager - "
"No rdb URI specified" ) ;
- if( sUnoUrl.equalsAscii( "local" ) ) {
+ if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) {
Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry();
OSL_ENSURE( xSimpleRegistry.is() ,
"serviceManager - "
"Cannot create simple registry" ) ;
- //xSimpleRegistry->open(OUString::createFromAscii("xmlsecurity.rdb"), sal_False, sal_False);
+ //xSimpleRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlsecurity.rdb")), sal_False, sal_False);
xSimpleRegistry->open(sRdbUrl, sal_True, sal_False);
OSL_ENSURE( xSimpleRegistry->isValid() ,
"serviceManager - "
@@ -136,10 +137,10 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"Cannot get multi-service factory" ) ;
Sequence< Any > args( 2 ) ;
- args[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ) ;
- args[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ) ;
+ args[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )) ;
+ args[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )) ;
if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) {
- throw RuntimeException( OUString::createFromAscii( "Cannot inlitialize ContentBroker" ) , Reference< XInterface >() , Any() ) ;
+ throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ;
}
}
********************************************************************/
@@ -158,7 +159,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"Cannot create intial service manager" ) ;
Reference< XInterface > urlResolver =
- xLocalServiceManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver") , xLocalComponentContext ) ;
+ xLocalServiceManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) , xLocalComponentContext ) ;
OSL_ENSURE( urlResolver.is() ,
"serviceManager - "
"Cannot get service instance of \"bridge.UnoUrlResolver\"" ) ;
@@ -182,7 +183,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"Cannot get interface of \"XNamingService\" from URL resolver" ) ;
Reference< XInterface > serviceManager =
- xNamingService->getRegisteredObject( OUString::createFromAscii( "StarOffice.ServiceManager" ) ) ;
+ xNamingService->getRegisteredObject( OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) ;
OSL_ENSURE( serviceManager.is() ,
"serviceManager - "
"Cannot get service instance of \"StarOffice.ServiceManager\"" ) ;
@@ -197,7 +198,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - "
"Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ;
- xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ;
+ xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ;
OSL_ENSURE( xUsedComponentContext.is() ,
"serviceManager - "
"Cannot create remote component context" ) ;
@@ -212,7 +213,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - "
"Cannot get interface of \"XPropertySet\" from URL resolver" ) ;
- xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ;
+ xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ;
OSL_ENSURE( xUsedComponentContext.is() ,
"serviceManager - "
"Cannot create remote component context" ) ;
@@ -236,7 +237,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - "
"Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ;
- xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ;
+ xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ;
OSL_ENSURE( xUsedComponentContext.is() ,
"serviceManager - "
"Cannot create remote component context" ) ;
@@ -264,3 +265,4 @@ char* PriPK11PasswordFunc(
return passwd ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/csfit/helper.hxx b/xmlsecurity/tools/standalone/csfit/helper.hxx
index 14a116444b63..a0f19532222a 100644
--- a/xmlsecurity/tools/standalone/csfit/helper.hxx
+++ b/xmlsecurity/tools/standalone/csfit/helper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,8 +45,6 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -239,3 +238,4 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
char* PriPK11PasswordFunc( PK11SlotInfo *slot , PRBool retry , void* arg ) ;
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/csfit/signer.cxx b/xmlsecurity/tools/standalone/csfit/signer.cxx
index 689b86ea369c..fc4e4d743943 100644
--- a/xmlsecurity/tools/standalone/csfit/signer.cxx
+++ b/xmlsecurity/tools/standalone/csfit/signer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -220,14 +221,14 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[4] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ;
OSL_ENSURE( xManager.is() ,
"ServicesManager - "
"Cannot get service manager" ) ;
//Create signature template
Reference< XInterface > element =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( element.is() ,
"Signer - "
"Cannot get service instance of \"wrapper.XMLElementWrapper\"" ) ;
@@ -252,7 +253,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Signature template
Reference< XInterface > signtpl =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignatureTemplate" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")) , xContext ) ;
OSL_ENSURE( signtpl.is() ,
"Signer - "
"Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ;
@@ -272,7 +273,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Signer - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -298,7 +299,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Signer - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -312,7 +313,7 @@ int SAL_CALL main( int argc, char **argv )
//Generate XML signature
Reference< XInterface > xmlsigner =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl")), xContext ) ;
OSL_ENSURE( xmlsigner.is() ,
"Signer - "
"Cannot get service instance of \"xsec.XMLSignature\"" ) ;
@@ -368,3 +369,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/csfit/verifier.cxx b/xmlsecurity/tools/standalone/csfit/verifier.cxx
index 54eaaa926a46..43c72a102c30 100644
--- a/xmlsecurity/tools/standalone/csfit/verifier.cxx
+++ b/xmlsecurity/tools/standalone/csfit/verifier.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -207,11 +208,11 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[3] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[3] ) ) ;
//Create signature template
Reference< XInterface > element =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( element.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -236,7 +237,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Signature template
Reference< XInterface > signtpl =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLSignatureTemplate"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")), xContext ) ;
OSL_ENSURE( signtpl.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ;
@@ -256,7 +257,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -282,7 +283,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -296,7 +297,7 @@ int SAL_CALL main( int argc, char **argv )
//Generate XML signature
Reference< XInterface > xmlsigner =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl")), xContext ) ;
OSL_ENSURE( xmlsigner.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLSignature\"" ) ;
@@ -338,3 +339,4 @@ done :
return 0 ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
index 2208eb2e6177..fee83746faff 100644
--- a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/** -- C++ Source File -- **/
// MARKER(update_precomp.py): autogen include statement, do not remove
@@ -62,7 +63,7 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[1] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[1] ) ) ;
OSL_ENSURE( xManager.is() ,
"ServicesManager - "
"Cannot get service manager" ) ;
@@ -70,7 +71,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Signer - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -150,3 +151,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
index c0864ffb7b2e..a481824ad52e 100644
--- a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/** -- C++ Source File -- **/
// MARKER(update_precomp.py): autogen include statement, do not remove
@@ -109,11 +110,11 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[4] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ;
//Create encryption template
Reference< XInterface > tplElement =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.xsec.XMLElementWrapper" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLElementWrapper")) , xContext ) ;
OSL_ENSURE( tplElement.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -137,7 +138,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Encryption template
Reference< XInterface > enctpl =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.XMLEncryptionTemplate"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLEncryptionTemplate")), xContext ) ;
OSL_ENSURE( enctpl.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ;
@@ -153,7 +154,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.SecurityEnvironment"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.SecurityEnvironment")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -180,7 +181,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.XMLSecurityContext"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLSecurityContext")), xContext ) ;
OSL_ENSURE( xmlsecctx.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -195,7 +196,7 @@ int SAL_CALL main( int argc, char **argv )
//Get encrypter
Reference< XInterface > xmlencrypter =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.xsec.XMLEncryption"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLEncryption")), xContext ) ;
OSL_ENSURE( xmlencrypter.is() ,
"Decryptor - "
"Cannot get service instance of \"xsec.XMLEncryption\"" ) ;
@@ -244,3 +245,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
index 7402d5c3984f..3f0e98ca8a50 100644
--- a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/** -- C++ Source File -- **/
// MARKER(update_precomp.py): autogen include statement, do not remove
@@ -124,11 +125,11 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[5] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[5] ) ) ;
//Create encryption template
Reference< XInterface > tplElement =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( tplElement.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -152,7 +153,7 @@ int SAL_CALL main( int argc, char **argv )
//Create encryption target element
Reference< XInterface > tarElement =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( tarElement.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -177,7 +178,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Encryption template
Reference< XInterface > enctpl =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLEncryptionTemplate"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ;
OSL_ENSURE( enctpl.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ;
@@ -194,7 +195,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -228,7 +229,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xmlsecctx.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -242,7 +243,7 @@ int SAL_CALL main( int argc, char **argv )
//Get encrypter
Reference< XInterface > xmlencrypter =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xmlencrypter.is() ,
"Encryptor - "
"Cannot get service instance of \"xsec.XMLEncryption\"" ) ;
@@ -306,3 +307,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx
index 86cacafa4a8b..4415b9c4a96a 100644
--- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/helper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "helper.hxx"
#include "osl/diagnose.h"
#include "rtl/ustring.h"
@@ -61,21 +62,21 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
Reference< XMultiComponentFactory > xUsedServiceManager = NULL ;
Reference< XComponentContext > xUsedComponentContext = NULL ;
- OSL_ENSURE( !sUnoUrl.equalsAscii( "" ) ,
+ OSL_ENSURE( sUnoUrl.getLength() ,
"serviceManager - "
"No uno URI specified" ) ;
- OSL_ENSURE( !sRdbUrl.equalsAscii( "" ) ,
+ OSL_ENSURE( sRdbUrl.getLength() ,
"serviceManager - "
"No rdb URI specified" ) ;
- if( sUnoUrl.equalsAscii( "local" ) ) {
+ if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) {
Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry();
OSL_ENSURE( xSimpleRegistry.is() ,
"serviceManager - "
"Cannot create simple registry" ) ;
- //xSimpleRegistry->open(OUString::createFromAscii("xmlsecurity.rdb"), sal_False, sal_False);
+ //xSimpleRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlsecurity.rdb")), sal_False, sal_False);
xSimpleRegistry->open(sRdbUrl, sal_True, sal_False);
OSL_ENSURE( xSimpleRegistry->isValid() ,
"serviceManager - "
@@ -104,10 +105,10 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"Cannot get multi-service factory" ) ;
Sequence< Any > args( 2 ) ;
- args[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ) ;
- args[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ) ;
+ args[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )) ;
+ args[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )) ;
if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) {
- throw RuntimeException( OUString::createFromAscii( "Cannot inlitialize ContentBroker" ) , Reference< XInterface >() , Any() ) ;
+ throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ;
}
}
********************************************************************/
@@ -129,7 +130,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"Cannot create intial service manager" ) ;
Reference< XInterface > urlResolver =
- xLocalServiceManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver") , xLocalComponentContext ) ;
+ xLocalServiceManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) , xLocalComponentContext ) ;
OSL_ENSURE( urlResolver.is() ,
"serviceManager - "
"Cannot get service instance of \"bridge.UnoUrlResolver\"" ) ;
@@ -153,7 +154,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"Cannot get interface of \"XNamingService\" from URL resolver" ) ;
Reference< XInterface > serviceManager =
- xNamingService->getRegisteredObject( OUString::createFromAscii( "StarOffice.ServiceManager" ) ) ;
+ xNamingService->getRegisteredObject( OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) ;
OSL_ENSURE( serviceManager.is() ,
"serviceManager - "
"Cannot get service instance of \"StarOffice.ServiceManager\"" ) ;
@@ -168,7 +169,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - "
"Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ;
- xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ;
+ xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ;
OSL_ENSURE( xUsedComponentContext.is() ,
"serviceManager - "
"Cannot create remote component context" ) ;
@@ -183,7 +184,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - "
"Cannot get interface of \"XPropertySet\" from URL resolver" ) ;
- xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ;
+ xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ;
OSL_ENSURE( xUsedComponentContext.is() ,
"serviceManager - "
"Cannot create remote component context" ) ;
@@ -207,7 +208,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - "
"Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ;
- xPropSet->getPropertyValue( OUString::createFromAscii( "DefaultContext" ) ) >>= xUsedComponentContext ;
+ xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ;
OSL_ENSURE( xUsedComponentContext.is() ,
"serviceManager - "
"Cannot create remote component context" ) ;
@@ -218,3 +219,4 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
return xUsedServiceManager ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.hxx b/xmlsecurity/tools/standalone/mscsfit/helper.hxx
index 0f95ef50c4ab..01d92511e96a 100644
--- a/xmlsecurity/tools/standalone/mscsfit/helper.hxx
+++ b/xmlsecurity/tools/standalone/mscsfit/helper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <stdio.h>
#include <rtl/ustring.hxx>
@@ -13,8 +14,6 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -202,3 +201,4 @@ Reference< XOutputStream > createStreamToFile( const OUString sFile ) ;
*/
Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext >& xContext , OUString sUnoUrl , OUString sRdbUrl ) throw( RuntimeException , Exception ) ;
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/mscsfit/makefile.mk b/xmlsecurity/tools/standalone/mscsfit/makefile.mk
index 1ab4575b5226..ce8be66850cf 100644
--- a/xmlsecurity/tools/standalone/mscsfit/makefile.mk
+++ b/xmlsecurity/tools/standalone/mscsfit/makefile.mk
@@ -31,7 +31,6 @@ PRJNAME=xmlsecurity
TARGET=xmlsecurity-mscxsfit
ENABLE_EXCEPTIONS=TRUE
NO_BSYMBOLIC=TRUE
-#TARGETTYPE=CUI
LIBTARGET=NO
@@ -109,21 +108,6 @@ APP4STDLIBS+= -lstdc++
APP4STDLIBS+= \
$(SHARE_LIBS)
-##
-## The 4th application
-##
-#APP5TARGET= decrypter
-#APP5OBJS= \
-# $(SHARE_OBJS) \
-# $(OBJ)$/decrypter.obj
-#
-#.IF "$(OS)" == "LINUX"
-#APP5STDLIBS+= -lstdc++
-#.ENDIF
-#
-#APP5STDLIBS+= \
-# $(SHARE_LIBS)
-
#
# The 5th application
#
diff --git a/xmlsecurity/tools/standalone/mscsfit/signer.cxx b/xmlsecurity/tools/standalone/mscsfit/signer.cxx
index 29542ee27492..270fb23bf076 100644
--- a/xmlsecurity/tools/standalone/mscsfit/signer.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/signer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/** -- C++ Source File -- **/
// MARKER(update_precomp.py): autogen include statement, do not remove
@@ -177,14 +178,14 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[3] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[3] ) ) ;
OSL_ENSURE( xManager.is() ,
"ServicesManager - "
"Cannot get service manager" ) ;
//Create signature template
Reference< XInterface > element =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( element.is() ,
"Signer - "
"Cannot get service instance of \"wrapper.XMLElementWrapper\"" ) ;
@@ -209,7 +210,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Signature template
Reference< XInterface > signtpl =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignatureTemplate" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")) , xContext ) ;
OSL_ENSURE( signtpl.is() ,
"Signer - "
"Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ;
@@ -229,7 +230,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Signer - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -260,7 +261,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Signer - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -274,7 +275,7 @@ int SAL_CALL main( int argc, char **argv )
//Generate XML signature
Reference< XInterface > xmlsigner =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xmlsigner.is() ,
"Signer - "
"Cannot get service instance of \"xsec.XMLSignature\"" ) ;
@@ -340,3 +341,4 @@ done:
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
index fa4325718fd1..6af44f0975c9 100644
--- a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
+++ b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/** -- C++ Source File -- **/
// MARKER(update_precomp.py): autogen include statement, do not remove
@@ -57,7 +58,6 @@ int SAL_CALL main( int argc, char **argv )
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] ) ;
@@ -180,11 +180,11 @@ int SAL_CALL main( int argc, char **argv )
Reference< XMultiComponentFactory > xManager = NULL ;
Reference< XComponentContext > xContext = NULL ;
- xManager = serviceManager( xContext , OUString::createFromAscii( "local" ), OUString::createFromAscii( argv[2] ) ) ;
+ xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[2] ) ) ;
//Create signature template
Reference< XInterface > element =
- xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ;
OSL_ENSURE( element.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ;
@@ -209,7 +209,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Signature template
Reference< XInterface > signtpl =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.crypto.XMLSignatureTemplate"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")), xContext ) ;
OSL_ENSURE( signtpl.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ;
@@ -229,7 +229,7 @@ int SAL_CALL main( int argc, char **argv )
//Create security environment
//Build Security Environment
Reference< XInterface > xsecenv =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ;
@@ -260,7 +260,7 @@ int SAL_CALL main( int argc, char **argv )
//Build XML Security Context
Reference< XInterface > xmlsecctx =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xsecenv.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ;
@@ -274,7 +274,7 @@ int SAL_CALL main( int argc, char **argv )
//Generate XML signature
Reference< XInterface > xmlsigner =
- xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl"), xContext ) ;
+ xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl")), xContext ) ;
OSL_ENSURE( xmlsigner.is() ,
"Verifier - "
"Cannot get service instance of \"xsec.XMLSignature\"" ) ;
@@ -326,3 +326,4 @@ done :
return 0 ;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/util/makefile.mk b/xmlsecurity/util/makefile.mk
index 4f60f4babe0e..de84faa27bcd 100644
--- a/xmlsecurity/util/makefile.mk
+++ b/xmlsecurity/util/makefile.mk
@@ -30,8 +30,6 @@ PRJ=..
PRJNAME=xmlsecurity
TARGET=xmlsecurity
-# Disable '-z defs' due to broken libxpcom.
-#LINKFLAGSDEFS=$(0)
USE_DEFFILE=TRUE
# --- Settings -----------------------------------------------------
@@ -113,6 +111,9 @@ SHL2STDLIBS += $(NSPR_LIB)
.IF "$(NSS_LIB)" != ""
SHL2STDLIBS += $(NSS_LIB)
.ENDIF
+.IF "$(MOZ_NSS_LIBS)" != ""
+SHL2STDLIBS += $(MOZ_NSS_LIBS)
+.ENDIF
.ENDIF
.IF "$(CRYPTO_ENGINE)" == "mscrypto"
diff --git a/xmlsecurity/util/target.pmk b/xmlsecurity/util/target.pmk
index e46a4a0d817a..42451acf2af9 100644
--- a/xmlsecurity/util/target.pmk
+++ b/xmlsecurity/util/target.pmk
@@ -26,7 +26,6 @@
#*************************************************************************
.IF "$(GUI)" == "WNT"
CRYPTO_ENGINE = mscrypto
-#CRYPTO_ENGINE = nss
.ELSE
CRYPTO_ENGINE = nss
.ENDIF
diff --git a/xmlsecurity/workben/makefile.mk b/xmlsecurity/workben/makefile.mk
index 2430a36431c8..e538f09352a2 100644
--- a/xmlsecurity/workben/makefile.mk
+++ b/xmlsecurity/workben/makefile.mk
@@ -56,7 +56,6 @@ APP1STDLIBS= $(CPPULIB) \
$(TOOLSLIB) \
$(SVTOOLLIB) \
$(SALLIB) \
- $(VOSLIB) \
$(SOTLIB) \
$(VCLLIB) \
$(SFXLIB) \
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index 005122b8cce7..c0d788639452 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,9 +83,6 @@ void Main();
#define LISTBOXHEIGHT 120
-// #define TEST_IMPLEMENTATION_DIRECTLY
-
-
// -----------------------------------------------------------------------
SAL_IMPLEMENT_MAIN()
@@ -95,7 +93,7 @@ void Main();
uno::Reference< uno::XComponentContext > xCtx( cppu::defaultBootstrap_InitialComponentContext() );
if ( !xCtx.is() )
{
- DBG_ERROR( "Error creating initial component context!" );
+ OSL_FAIL( "Error creating initial component context!" );
return -1;
}
@@ -103,25 +101,25 @@ void Main();
if ( !xMSF.is() )
{
- DBG_ERROR( "No service manager!" );
+ OSL_FAIL( "No service manager!" );
return -1;
}
// Init USB
uno::Sequence< uno::Any > aArgs( 2 );
- aArgs[ 0 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL );
- aArgs[ 1 ] <<= rtl::OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE );
+ aArgs[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL ));
+ aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE ));
sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xMSF, aArgs );
if ( !bSuccess )
{
- DBG_ERROR( "Error creating UCB!" );
+ OSL_FAIL( "Error creating UCB!" );
return -1;
}
}
catch ( uno::Exception const & )
{
- DBG_ERROR( "Exception during creation of initial component context!" );
+ OSL_FAIL( "Exception during creation of initial component context!" );
return -1;
}
comphelper::setProcessServiceFactory( xMSF );
@@ -208,11 +206,7 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
maCryptoCheckBox( this )
{
-#ifdef TEST_IMPLEMENTATION_DIRECTLY
- Size aOutputSize( 400, 600 );
-#else
Size aOutputSize( 400, 400 );
-#endif
SetOutputSizePixel( aOutputSize );
SetText( String( RTL_CONSTASCII_USTRINGPARAM( "XML Signature Test" ) ) );
@@ -243,55 +237,6 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
nY += EDITHEIGHT*3;
-#ifdef TEST_IMPLEMENTATION_DIRECTLY
-
- maTest1Line.SetPosSizePixel( TEXTFIELDSTARTX, nY, aOutputSize.Width()-2*TEXTFIELDSTARTX, FIXEDLINEHEIGHT );
- maTest1Line.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Test simple files" ) ) );
- maTest1Line.Show();
-
- nY += EDITHEIGHT*3/2;
-
- maFixedTextXMLFileName.SetPosSizePixel( TEXTFIELDSTARTX, nY, TEXTFIELDWIDTH, EDITHEIGHT );
- maFixedTextXMLFileName.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "XML File:" ) ) );
- maFixedTextXMLFileName.Show();
-
- maEditXMLFileName.SetPosSizePixel( TEXTFIELDSTARTX+TEXTFIELDWIDTH, nY, EDITWIDTH, EDITHEIGHT );
- maEditXMLFileName.Show();
-
- nY += EDITHEIGHT*3/2;
-
- maFixedTextBINFileName.SetPosSizePixel( TEXTFIELDSTARTX, nY, TEXTFIELDWIDTH, EDITHEIGHT );
- maFixedTextBINFileName.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Binary File:" ) ) );
- maFixedTextBINFileName.Show();
-
- maEditBINFileName.SetPosSizePixel( TEXTFIELDSTARTX+TEXTFIELDWIDTH, nY, EDITWIDTH, EDITHEIGHT );
- maEditBINFileName.Show();
-
- nY += EDITHEIGHT*3/2;
-
- maFixedTextSIGFileName.SetPosSizePixel( TEXTFIELDSTARTX, nY, TEXTFIELDWIDTH, EDITHEIGHT );
- maFixedTextSIGFileName.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Signature File:" ) ) );
- maFixedTextSIGFileName.Show();
-
- maEditSIGFileName.SetPosSizePixel( TEXTFIELDSTARTX+TEXTFIELDWIDTH, nY, EDITWIDTH, EDITHEIGHT );
- maEditSIGFileName.Show();
-
- nY += EDITHEIGHT*2;
-
- maSignButton.SetPosSizePixel( TEXTFIELDSTARTX, nY, BUTTONWIDTH, BUTTONHEIGHT );
- maSignButton.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Sign" ) ) );
- maSignButton.SetClickHdl( LINK( this, MyWin, SignButtonHdl ) );
- maSignButton.Show();
-
- maVerifyButton.SetPosSizePixel( TEXTFIELDSTARTX+BUTTONWIDTH+BUTTONSPACE, nY, BUTTONWIDTH, BUTTONHEIGHT );
- maVerifyButton.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Verify" ) ) );
- maVerifyButton.SetClickHdl( LINK( this, MyWin, VerifyButtonHdl ) );
- maVerifyButton.Show();
-
- nY += EDITHEIGHT*3;
-
-#endif // TEST_IMPLEMENTATION_DIRECTLY
-
maTest2Line.SetPosSizePixel( TEXTFIELDSTARTX, nY, aOutputSize.Width()-2*TEXTFIELDSTARTX, FIXEDLINEHEIGHT );
maTest2Line.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Test Office Document" ) ) );
maTest2Line.Show();
@@ -410,142 +355,4 @@ IMPL_LINK( MyWin, VerifyDigitalSignaturesHdl, Button*, EMPTYARG )
return 0;
}
-
-#ifdef TEST_IMPLEMENTATION_DIRECTLY
-
-IMPL_LINK( MyWin, DigitalSignaturesWithTokenHdl, Button*, EMPTYARG )
-{
- String aDocFileName = maEditDOCFileName.GetText();
- String aTokenFileName = maEditTokenName.GetText();
-
- DigitalSignaturesDialog aSignaturesDialog( this, comphelper::getProcessServiceFactory(), SignatureModeDocumentContent, false );
-
- bool bInit = aSignaturesDialog.Init( aTokenFileName );
- if ( !bInit )
- {
- ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
- return 0;
- }
-
- uno::Reference < embed::XStorage > xStore = ::comphelper::OStorageHelper::GetStorageFromURL(
- aDocFileName, embed::ElementModes::READWRITE, comphelper::getProcessServiceFactory() );
-
- aSignaturesDialog.SetStorage( xStore );
-
- aSignaturesDialog.Execute();
-
- return 0;
-}
-
-IMPL_LINK( MyWin, SignButtonHdl, Button*, EMPTYARG )
-{
- String aXMLFileName = maEditXMLFileName.GetText();
- String aBINFileName = maEditBINFileName.GetText();
- String aSIGFileName = maEditSIGFileName.GetText();
-
- String aTokenFileName;
- if ( !maCryptoCheckBox.IsChecked() )
- aTokenFileName = maEditTokenName.GetText();
-
- XMLSignatureHelper aSignatureHelper( comphelper::getProcessServiceFactory() );
- bool bInit = aSignatureHelper.Init( aTokenFileName );
-
- if ( !bInit )
- {
- ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
- return 0;
- }
-
- uno::Reference< ::com::sun::star::security::XCertificate > xCertToUse;
- CertificateChooser aChooser( this, aSignatureHelper.GetSecurityEnvironment(), SignatureInformations() );
- if ( aChooser.Execute() )
- xCertToUse = aChooser.GetSelectedCertificate();
-
- if ( !xCertToUse.is() )
- return 0;
-
-
- aSignatureHelper.StartMission();
-
- sal_Int32 nSecurityId = aSignatureHelper.GetNewSecurityId();
-
- aSignatureHelper.SetX509Certificate( nSecurityId, xCertToUse->getIssuerName(), bigIntegerToNumericString( xCertToUse->getSerialNumber() ) );
-
- aSignatureHelper.AddForSigning( nSecurityId, aXMLFileName, aXMLFileName, sal_False );
- aSignatureHelper.AddForSigning( nSecurityId, aBINFileName, aBINFileName, sal_True );
-
- SvFileStream* pStream = new SvFileStream( aSIGFileName, STREAM_WRITE );
- SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True );
- uno::Reference< io::XOutputStream > xOutputStream = new utl::OOutputStreamHelper( xLockBytes );
- bool bDone = aSignatureHelper.CreateAndWriteSignature( xOutputStream );
-
- aSignatureHelper.EndMission();
-
- if ( !bDone )
- {
- ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error creating Signature!" ) ) ).Execute();
- }
- else
- {
- rtl::OUString aInfo( String( RTL_CONSTASCII_USTRINGPARAM( "Signature successfully created!\n\n" ) ) );
- // aInfo += getSignatureInformationmations( aSignatureHelper.getAllSignatureInformation(), aSignatureHelper.GetSecurityEnvironment() );
-
-
- InfoBox( this, aInfo ).Execute();
- }
-
- // Check for more detailed results...
-
- return 0;
-}
-
-IMPL_LINK( MyWin, VerifyButtonHdl, Button*, EMPTYARG )
-{
- String aXMLFileName = maEditXMLFileName.GetText();
- String aBINFileName = maEditBINFileName.GetText();
- String aSIGFileName = maEditSIGFileName.GetText();
-
- String aTokenFileName;
- if ( !maCryptoCheckBox.IsChecked() )
- aTokenFileName = maEditTokenName.GetText();
-
- XMLSignatureHelper aSignatureHelper( comphelper::getProcessServiceFactory() );
- bool bInit = aSignatureHelper.Init( aTokenFileName );
-
- if ( !bInit )
- {
- ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
- return 0;
- }
-
- aSignatureHelper.SetStartVerifySignatureHdl( LINK( this, MyWin, StartVerifySignatureHdl ) );
-
- aSignatureHelper.StartMission();
-
- SvFileStream* pStream = new SvFileStream( aSIGFileName, STREAM_READ );
- pStream->Seek( STREAM_SEEK_TO_END );
- sal_uLong nBytes = pStream->Tell();
- pStream->Seek( STREAM_SEEK_TO_BEGIN );
- SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True );
- uno::Reference< io::XInputStream > xInputStream = new utl::OInputStreamHelper( xLockBytes, nBytes );
- bool bDone = aSignatureHelper.ReadAndVerifySignature( xInputStream );
- xInputStream->closeInput();
-
- aSignatureHelper.EndMission();
-
- if ( !bDone )
- ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error in Signature!" ) ) ).Execute();
- else
- InfoBox( this, String( RTL_CONSTASCII_USTRINGPARAM( "Signatures verified without any problems!" ) ) ).Execute();
-
- return 0;
-}
-
-IMPL_LINK( MyWin, StartVerifySignatureHdl, void*, EMPTYARG )
-{
- QueryBox aQueryBox( this, WB_YES_NO|WB_DEF_YES, String( RTL_CONSTASCII_USTRINGPARAM( "Found Signature - Verify?" ) ) );
- return ( aQueryBox.Execute() == RET_YES ) ? 1 : 0;
-}
-
-
-#endif // #ifdef TEST_IMPLEMENTATION_DIRECTLY
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */