summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/security
diff options
context:
space:
mode:
Diffstat (limited to 'offapi/com/sun/star/security')
-rw-r--r--offapi/com/sun/star/security/CertificateCharacters.idl64
-rw-r--r--offapi/com/sun/star/security/CertificateContainer.idl49
-rw-r--r--offapi/com/sun/star/security/CertificateContainerStatus.idl67
-rw-r--r--offapi/com/sun/star/security/CertificateException.idl57
-rw-r--r--offapi/com/sun/star/security/CertificateValidity.idl136
-rw-r--r--offapi/com/sun/star/security/CryptographyException.idl58
-rw-r--r--offapi/com/sun/star/security/DocumentDigitalSignatures.idl58
-rw-r--r--offapi/com/sun/star/security/DocumentSignatureInformation.idl89
-rw-r--r--offapi/com/sun/star/security/EncryptionException.idl58
-rw-r--r--offapi/com/sun/star/security/KeyException.idl58
-rw-r--r--offapi/com/sun/star/security/KeyUsage.idl52
-rw-r--r--offapi/com/sun/star/security/NoPasswordException.idl58
-rw-r--r--offapi/com/sun/star/security/SecurityInfrastructureException.idl58
-rw-r--r--offapi/com/sun/star/security/SerialNumberAdapter.idl60
-rw-r--r--offapi/com/sun/star/security/SignatureException.idl58
-rw-r--r--offapi/com/sun/star/security/XCertificate.idl140
-rw-r--r--offapi/com/sun/star/security/XCertificateContainer.idl69
-rw-r--r--offapi/com/sun/star/security/XCertificateExtension.idl68
-rw-r--r--offapi/com/sun/star/security/XDocumentDigitalSignatures.idl156
-rw-r--r--offapi/com/sun/star/security/XSerialNumberAdapter.idl62
-rw-r--r--offapi/com/sun/star/security/makefile.mk71
21 files changed, 1546 insertions, 0 deletions
diff --git a/offapi/com/sun/star/security/CertificateCharacters.idl b/offapi/com/sun/star/security/CertificateCharacters.idl
new file mode 100644
index 000000000000..7504db4ef045
--- /dev/null
+++ b/offapi/com/sun/star/security/CertificateCharacters.idl
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CertificateCharacters.idl,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_CertificateCharacters_idl_
+#define __com_sun_star_security_CertificateCharacters_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/util/DateTime.idl>
+
+module com { module sun { module star { module security {
+
+/**
+ * Constant definiton of a certificate characters.
+ *
+ * The certificate characters will be defined as bit-wise constants.
+ */
+constants CertificateCharacters
+{
+ /**
+ * It is a self-signed certificate.
+ */
+ const long SELF_SIGNED = 0x00000001 ;
+
+ /**
+ * A private key binding with the certificate is in user's profile.
+ */
+ const long HAS_PRIVATE_KEY = 0x00000004 ;
+} ;
+
+} ; } ; } ; } ;
+
+#endif
+
diff --git a/offapi/com/sun/star/security/CertificateContainer.idl b/offapi/com/sun/star/security/CertificateContainer.idl
new file mode 100644
index 000000000000..2bb4ca315fd5
--- /dev/null
+++ b/offapi/com/sun/star/security/CertificateContainer.idl
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CertificateContainer.idl,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#if ! defined INCLUDED_com_sun_star_security_CertificateContainer_idl
+#define INCLUDED_com_sun_star_security_CertificateContainer_idl
+
+#include <com/sun/star/security/XCertificateContainer.idl>
+#include <com/sun/star/uno/XInterface.idl>
+
+#include <com/sun/star/lang/XInitialization.idl>
+#include <com/sun/star/lang/XServiceInfo.idl>
+
+module com { module sun { module star { module security {
+
+/** the service to be used for <type>XCertificateContainer</type>.
+ @since OOo 2.3.1
+*/
+service CertificateContainer: XCertificateContainer;
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/security/CertificateContainerStatus.idl b/offapi/com/sun/star/security/CertificateContainerStatus.idl
new file mode 100644
index 000000000000..77730030ea7e
--- /dev/null
+++ b/offapi/com/sun/star/security/CertificateContainerStatus.idl
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CertificateContainerStatus.idl,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_CertificateContainerStatus_idl_
+#define __com_sun_star_security_CertificateContainerStatus_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/util/DateTime.idl>
+
+module com { module sun { module star { module security {
+
+/**
+ * Constant definiton of a certificate container status.
+ *
+ */
+enum CertificateContainerStatus
+{
+ /**
+ * The certificate was not found.
+ */
+ NOCERT,
+
+ /**
+ * The certificate was found and is trusted.
+ */
+ TRUSTED,
+
+ /**
+ * The certificate was found but is untrusted.
+ */
+ UNTRUSTED
+
+};
+
+} ; } ; } ; } ;
+
+#endif
+
diff --git a/offapi/com/sun/star/security/CertificateException.idl b/offapi/com/sun/star/security/CertificateException.idl
new file mode 100644
index 000000000000..722145de9477
--- /dev/null
+++ b/offapi/com/sun/star/security/CertificateException.idl
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CertificateException.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_CertificateException_idl__
+#define __com_sun_star_security_CertificateException_idl__
+
+#ifndef __com_sun_star_uno_SecurityException_idl__
+#include <com/sun/star/uno/SecurityException.idl>
+#endif
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+exception CertificateException : com::sun::star::uno::SecurityException
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/CertificateValidity.idl b/offapi/com/sun/star/security/CertificateValidity.idl
new file mode 100644
index 000000000000..783bb92b735b
--- /dev/null
+++ b/offapi/com/sun/star/security/CertificateValidity.idl
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CertificateValidity.idl,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_CertificateValidity_idl_
+#define __com_sun_star_security_CertificateValidity_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/util/DateTime.idl>
+
+module com { module sun { module star { module security {
+
+/**
+ * Constant definiton of a certificate characters.
+ *
+ * The certificate characters will be defined as bit-wise constants.
+ */
+constants CertificateValidity
+{
+ const long VALID = 0x00000000;
+ /**
+ * The certificate is invalid.
+ */
+ const long INVALID = 0x00000001 ;
+
+ /**
+ * The certificate itself is untrusted.
+ */
+ const long UNTRUSTED = 0x00000002 ;
+
+ /**
+ * The current time is not in the range of time for
+ * which the certificate is valid.
+ */
+ const long TIME_INVALID = 0x00000004 ;
+
+ /** The time range of a certificate does not fall within
+ the time range of the issuing certificate.
+ */
+ const long NOT_TIME_NESTED = 0x00000008;
+
+ /**
+ * It is a revoked certificate.
+ */
+ const long REVOKED = 0x00000010 ;
+
+ /**
+ * The certificate revocation status is unknown.
+ */
+ const long UNKNOWN_REVOKATION = 0x00000020 ;
+
+ /**
+ * The certificate signature is invalid.
+ */
+ const long SIGNATURE_INVALID = 0x00000040 ;
+
+ /**
+ * The certificate has invalid extensions.
+ */
+ const long EXTENSION_INVALID = 0x00000080 ;
+
+ /**
+ * The certificate has critical unknown extensions.
+ */
+ const long EXTENSION_UNKNOWN = 0x00000100 ;
+
+ /**
+ * The certificate issuer is unknown.
+ */
+ const long ISSUER_UNKNOWN = 0x00000200;
+
+ /**
+ * The certificate issuer is untrusted.
+ */
+ const long ISSUER_UNTRUSTED = 0x00000400 ;
+
+ /**
+ * The certificate issuer is invalid.
+ */
+ const long ISSUER_INVALID = 0x00001000 ;
+
+ /**
+ * The root certificate is unknown.
+ */
+ const long ROOT_UNKNOWN = 0x00002000 ;
+
+ /**
+ * The root certificate is untrusted.
+ */
+ const long ROOT_UNTRUSTED = 0x00004000 ;
+
+ /**
+ * The root certificate is invalid.
+ */
+ const long ROOT_INVALID = 0x00010000 ;
+
+ /**
+ * The certificate chain is incomplete.
+ */
+ const long CHAIN_INCOMPLETE = 0x00020000 ;
+} ;
+
+} ; } ; } ; } ;
+
+#endif
+
diff --git a/offapi/com/sun/star/security/CryptographyException.idl b/offapi/com/sun/star/security/CryptographyException.idl
new file mode 100644
index 000000000000..461727cf44a2
--- /dev/null
+++ b/offapi/com/sun/star/security/CryptographyException.idl
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CryptographyException.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_CryptographyException_idl__
+#define __com_sun_star_security_CryptographyException_idl__
+
+#ifndef __com_sun_star_uno_SecurityException_idl__
+#include <com/sun/star/uno/SecurityException.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+exception CryptographyException : com::sun::star::uno::SecurityException
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/DocumentDigitalSignatures.idl b/offapi/com/sun/star/security/DocumentDigitalSignatures.idl
new file mode 100644
index 000000000000..96bd0e5b8b24
--- /dev/null
+++ b/offapi/com/sun/star/security/DocumentDigitalSignatures.idl
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: DocumentDigitalSignatures.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+#ifndef __com_sun_star_security_documentdigitalsignatures_idl_
+#define __com_sun_star_security_documentdigitalsignatures_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/uno/Exception.idl>
+
+#include <com/sun/star/lang/XInitialization.idl>
+#include <com/sun/star/lang/XServiceInfo.idl>
+
+#include "XDocumentDigitalSignatures.idl"
+
+module com { module sun { module star { module security {
+
+/**
+ * Service of DocumentDigitalSignatures
+ */
+
+ service Decryptor {
+ interface XDocumentDigitalSignatures ;
+};
+
+} ; } ; } ; } ;
+
+
+#endif
+
diff --git a/offapi/com/sun/star/security/DocumentSignatureInformation.idl b/offapi/com/sun/star/security/DocumentSignatureInformation.idl
new file mode 100644
index 000000000000..4ed6d972705c
--- /dev/null
+++ b/offapi/com/sun/star/security/DocumentSignatureInformation.idl
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: DocumentSignatureInformation.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_security_DocumentSignatureInformation_idl__
+#define __com_sun_star_security_DocumentSignatureInformation_idl__
+
+#include <com/sun/star/security/XCertificate.idl>
+#include <com/sun/star/security/CertificateValidity.idl>
+
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+/** Status of digital signatures in a document.
+
+ <p>
+ This structure has the information about a digital signature in a document, and the status if the signature is valid.
+ </p>
+ */
+
+struct DocumentSignatureInformation
+{
+ XCertificate Signer;
+ long SignatureDate;
+ long SignatureTime;
+ boolean SignatureIsValid;
+ /* reflects the validity of the certificate.
+ Contains a value from the constants of
+ <type scope="com::sun::star::security">CertificateValidity</type>.
+ */
+ long CertificateStatus;
+ /* indicates what content of a document is signed.
+ <p>
+ This value can be ignored when this struct is returned as part of
+ a macro signature validation.
+ As of OpenOffice.org 3.2 and ODF 1.2 the document signature comprises
+ all files except the signature file itself.
+ Signatures in OOo 2.x were only
+ applied to the files in the root of the document, except mimetype, the
+ Pictures and ObjectReplacements/Objects folder. That is, macros
+ were not part of the document signature.
+ OOo 3.0 signed everthing, execept mimetype and the META-INF folder.
+ <p>
+ If PartialDocumentSignature is true, then the signature was created by OOo
+ with a version less then 3.2. In this case, not all files are signed. The
+ signature can still be regarded as valid, as long as SignatureIsValid is true
+ and the certificate could be validated. However, users should be notified about
+ the fact, that not everything in this document is signed.
+ */
+ boolean PartialDocumentSignature;
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/EncryptionException.idl b/offapi/com/sun/star/security/EncryptionException.idl
new file mode 100644
index 000000000000..aa2cce95f2ab
--- /dev/null
+++ b/offapi/com/sun/star/security/EncryptionException.idl
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: EncryptionException.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_EncryptionException_idl__
+#define __com_sun_star_security_EncryptionException_idl__
+
+#ifndef __com_sun_star_security_CryptographyException_idl__
+#include <com/sun/star/security/CryptographyException.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+exception EncryptionException : com::sun::star::security::CryptographyException
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/KeyException.idl b/offapi/com/sun/star/security/KeyException.idl
new file mode 100644
index 000000000000..83048df59b18
--- /dev/null
+++ b/offapi/com/sun/star/security/KeyException.idl
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: KeyException.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_KeyException_idl__
+#define __com_sun_star_security_KeyException_idl__
+
+#ifndef __com_sun_star_uno_SecurityException_idl__
+#include <com/sun/star/uno/SecurityException.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+exception KeyException : com::sun::star::uno::SecurityException
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/KeyUsage.idl b/offapi/com/sun/star/security/KeyUsage.idl
new file mode 100644
index 000000000000..2e61366566f5
--- /dev/null
+++ b/offapi/com/sun/star/security/KeyUsage.idl
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: KeyUsage.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_security_keyusage_idl_
+#define __com_sun_star_security_keyusage_idl_
+
+module com { module sun { module star { module security {
+
+constants KeyUsage
+{
+ const long DIGITAL_SIGNATURE = 0x80;
+ const long NON_REPUDIATION = 0x40;
+ const long KEY_ENCIPHERMENT = 0x20;
+ const long DATA_ENCIPHERMENT = 0x10;
+ const long KEY_AGREEMENT = 0x08;
+ const long KEY_CERT_SIGN = 0x04;
+ const long CRL_SIGN = 0x02;
+};
+
+
+} ; } ; } ; } ;
+
+
+#endif
+
diff --git a/offapi/com/sun/star/security/NoPasswordException.idl b/offapi/com/sun/star/security/NoPasswordException.idl
new file mode 100644
index 000000000000..2b1de554a0fd
--- /dev/null
+++ b/offapi/com/sun/star/security/NoPasswordException.idl
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: NoPasswordException.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_NoPasswordException_idl__
+#define __com_sun_star_security_NoPasswordException_idl__
+
+#ifndef __com_sun_star_uno_SecurityException_idl__
+#include <com/sun/star/uno/SecurityException.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+exception NoPasswordException : com::sun::star::uno::SecurityException
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/SecurityInfrastructureException.idl b/offapi/com/sun/star/security/SecurityInfrastructureException.idl
new file mode 100644
index 000000000000..1c5fede16bef
--- /dev/null
+++ b/offapi/com/sun/star/security/SecurityInfrastructureException.idl
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SecurityInfrastructureException.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_SecurityInfrastructureException_idl__
+#define __com_sun_star_security_SecurityInfrastructureException_idl__
+
+#ifndef __com_sun_star_uno_SecurityException_idl__
+#include <com/sun/star/uno/SecurityException.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+exception SecurityInfrastructureException : com::sun::star::uno::SecurityException
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/SerialNumberAdapter.idl b/offapi/com/sun/star/security/SerialNumberAdapter.idl
new file mode 100644
index 000000000000..b5189475a555
--- /dev/null
+++ b/offapi/com/sun/star/security/SerialNumberAdapter.idl
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SerialNumberAdapter.idl,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_security_SerialNumberAdapter_idl_
+#define __com_sun_star_security_SerialNumberAdapter_idl_
+
+//============================================================================
+
+module com { module sun { module star { module security {
+ interface XSerialNumberAdapter; };
+}; }; };
+
+//============================================================================
+
+module com { module sun { module star { module security {
+
+//============================================================================
+
+/** provides conversion services for Serial Numbers.
+
+ <p>An implementation of this service enables the conversion of certificate
+ serial number to and from a string</p>
+
+ @since OOo 3.1.0
+ */
+
+service SerialNumberAdapter : XSerialNumberAdapter;
+
+//============================================================================
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/security/SignatureException.idl b/offapi/com/sun/star/security/SignatureException.idl
new file mode 100644
index 000000000000..c3fd12a874d1
--- /dev/null
+++ b/offapi/com/sun/star/security/SignatureException.idl
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SignatureException.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_SignatureException_idl__
+#define __com_sun_star_security_SignatureException_idl__
+
+#ifndef __com_sun_star_security_CryptographyException_idl__
+#include <com/sun/star/security/CryptographyException.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module security {
+
+//=============================================================================
+
+exception SignatureException : com::sun::star::security::CryptographyException
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/security/XCertificate.idl b/offapi/com/sun/star/security/XCertificate.idl
new file mode 100644
index 000000000000..123737211636
--- /dev/null
+++ b/offapi/com/sun/star/security/XCertificate.idl
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XCertificate.idl,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_XCertificate_idl_
+#define __com_sun_star_security_XCertificate_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/util/DateTime.idl>
+#include <com/sun/star/security/XCertificateExtension.idl>
+
+module com { module sun { module star { module security {
+
+/**
+ * Interface of a PKI Certificate
+ *
+ * <p>This interface represents a x509 certificate.</p>
+ */
+interface XCertificate : com::sun::star::uno::XInterface
+{
+ /**
+ * the version number attribute of the certificate.
+ */
+ [attribute, readonly] short Version ;
+
+ /**
+ * the serial number attribute of the certificate.
+ */
+ [attribute, readonly] sequence< byte > SerialNumber ;
+
+ /**
+ * the issuer name attribute of the certificate.
+ */
+ [attribute, readonly] string IssuerName ;
+
+ /**
+ * the subject name attribute of the certificate.
+ */
+ [attribute, readonly] string SubjectName ;
+
+ /**
+ * the validity NotBefore date attribute of the certificate.
+ */
+ [attribute, readonly] com::sun::star::util::DateTime NotValidBefore ;
+
+ /**
+ * the validity NotAfter date attribute of the certificate.
+ */
+ [attribute, readonly] com::sun::star::util::DateTime NotValidAfter ;
+
+ /**
+ * the issuer unique ID attribute of the certificate.
+ */
+ [attribute, readonly] sequence< byte > IssuerUniqueID ;
+
+ /**
+ * the subject unique ID attribute of the certificate.
+ */
+ [attribute, readonly] sequence< byte > SubjectUniqueID ;
+
+ /**
+ * all extensions of a certificate.
+ */
+ [attribute, readonly] sequence< XCertificateExtension > Extensions ;
+
+ /**
+ * the DER encoded form of the certificate
+ */
+ [attribute, readonly] sequence< byte > Encoded ;
+
+ /**
+ * the algorithm of the subject public key
+ */
+ [attribute, readonly] string SubjectPublicKeyAlgorithm;
+
+ /**
+ * the value of the subject public key
+ */
+ [attribute, readonly] sequence< byte > SubjectPublicKeyValue;
+
+ /**
+ * the signature algorithm
+ */
+ [attribute, readonly] string SignatureAlgorithm;
+
+ /**
+ * the SHA1 thumbprint
+ */
+ [attribute, readonly] sequence< byte > SHA1Thumbprint;
+
+ /**
+ * the MD5 thumbprint
+ */
+ [attribute, readonly] sequence< byte > MD5Thumbprint;
+
+ /**
+ * Find a extension with a object identifier.
+ */
+ XCertificateExtension findCertificateExtension( [in]sequence< byte > oid ) ;
+
+ /**
+ * get the certificate usage
+ */
+ long getCertificateUsage();
+} ;
+
+} ; } ; } ; } ;
+
+#endif
+
diff --git a/offapi/com/sun/star/security/XCertificateContainer.idl b/offapi/com/sun/star/security/XCertificateContainer.idl
new file mode 100644
index 000000000000..84f2b1c9374e
--- /dev/null
+++ b/offapi/com/sun/star/security/XCertificateContainer.idl
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XCertificateContainer.idl,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#if ! defined INCLUDED_com_sun_star_security_XCertificateContainer_idl
+#define INCLUDED_com_sun_star_security_XCertificateContainer_idl
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/security/CertificateContainerStatus.idl>
+
+module com { module sun { module star { module security {
+
+/** Manage user certificate for temporary connections.
+ @see CertificateContainer
+ @since OOo 2.3.1
+*/
+interface XCertificateContainer
+{
+ /** Store the certificate in memory.
+ @param url
+ @param cert
+ @param trust
+ @return boolean
+ */
+
+ boolean addCertificate( [in] string url,
+ [in] string cert, [in] boolean trust );
+
+ /** Sheck if a certificate was stored earlier before.
+ @param url
+ @param cert
+ @return CertificateContainerStatus
+
+ */
+
+ CertificateContainerStatus hasCertificate([in] string url,
+ [in] string cert );
+
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/security/XCertificateExtension.idl b/offapi/com/sun/star/security/XCertificateExtension.idl
new file mode 100644
index 000000000000..6fd9e27b93a3
--- /dev/null
+++ b/offapi/com/sun/star/security/XCertificateExtension.idl
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XCertificateExtension.idl,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_XCertificateExtension_idl_
+#define __com_sun_star_security_XCertificateExtension_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+
+module com { module sun { module star { module security {
+
+/**
+ * Interface of a PKI Certificate
+ *
+ * <p>This interface represents a x509 certificate.</p>
+ */
+interface XCertificateExtension : com::sun::star::uno::XInterface
+{
+ /**
+ * Check whether it is a critical extension
+ */
+ boolean isCritical() ;
+
+ /**
+ * Get the extension object identifier in string.
+ */
+ [attribute, readonly] sequence< byte > ExtensionId ;
+
+ /**
+ * Get the extension value
+ */
+ [attribute, readonly] sequence< byte > ExtensionValue ;
+};
+
+} ; } ; } ; } ;
+
+#endif
+
diff --git a/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl
new file mode 100644
index 000000000000..66e455a7a7ae
--- /dev/null
+++ b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XDocumentDigitalSignatures.idl,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//i20156 - new file for xmlsecurity module
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_XDocumentDigitalSignatures_idl_
+#define __com_sun_star_security_XDocumentDigitalSignatures_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/io/XInputStream.idl>
+#include <com/sun/star/io/XStream.idl>
+#include <com/sun/star/embed/XStorage.idl>
+#include <com/sun/star/security/DocumentSignatureInformation.idl>
+#include <com/sun/star/security/XCertificate.idl>
+
+module com { module sun { module star { module security {
+
+/** interface for signing and verifying digital signatures in office documents
+
+ <p>
+ This interface can be used to digitaly sign different content in a office document.
+ It can also be used to verify digital signatures.
+ </p>
+ */
+
+interface XDocumentDigitalSignatures : com::sun::star::uno::XInterface
+{
+ /** signs the content of the document including text and pictures.
+
+ <p>Macros will not be signed.</p>
+ */
+ boolean signDocumentContent( [in] ::com::sun::star::embed::XStorage xStorage,
+ [in] ::com::sun::star::io::XStream xSignStream);
+
+ /** checks for digital signatures and their status.
+
+ <p>Only document content will be checked.</p>
+ */
+ sequence< com::sun::star::security::DocumentSignatureInformation > verifyDocumentContentSignatures(
+ [in] ::com::sun::star::embed::XStorage xStorage,
+ [in] ::com::sun::star::io::XInputStream xSignInStream );
+
+ /** shows the digital signatures of the document content
+ */
+ void showDocumentContentSignatures(
+ [in] ::com::sun::star::embed::XStorage xStorage,
+ [in] ::com::sun::star::io::XInputStream xSignInStream );
+
+ /** allows to get the default stream name for storing of the signature of
+ the document content.
+ */
+ string getDocumentContentSignatureDefaultStreamName();
+
+ /** signs the content of the Scripting including macros and basic dialogs
+
+ <p>The rest of document content will not be signed.</p>
+ */
+ boolean signScriptingContent( [in] ::com::sun::star::embed::XStorage xStorage,
+ [in] ::com::sun::star::io::XStream xSignStream);
+
+ /** checks for digital signatures and their status.
+
+ <p>Only Scripting content will be checked.</p>
+ */
+ sequence< com::sun::star::security::DocumentSignatureInformation > verifyScriptingContentSignatures(
+ [in] ::com::sun::star::embed::XStorage xStorage,
+ [in] ::com::sun::star::io::XInputStream xSignInStream );
+
+ /** shows the digital signatures of the scripting content
+ */
+ void showScriptingContentSignatures(
+ [in] ::com::sun::star::embed::XStorage xStorage,
+ [in] ::com::sun::star::io::XInputStream xSignInStream );
+
+ /** allows to get the default stream name for storing of the signature of
+ the scripting content.
+ */
+ string getScriptingContentSignatureDefaultStreamName();
+
+ /** signs the full Package, which means everything in the storage excecpt the content of META-INF
+ */
+ boolean signPackage( [in] ::com::sun::star::embed::XStorage Storage,
+ [in] ::com::sun::star::io::XStream xSignStream);
+
+ /** checks for digital signatures and their status.
+
+ <p>Only Package content will be checked.</p>
+ */
+ sequence< com::sun::star::security::DocumentSignatureInformation > verifyPackageSignatures(
+ [in] ::com::sun::star::embed::XStorage Storage,
+ [in] ::com::sun::star::io::XInputStream xSignInStream );
+
+ /** shows the digital signatures of the package
+ */
+ void showPackageSignatures(
+ [in] ::com::sun::star::embed::XStorage xStorage,
+ [in] ::com::sun::star::io::XInputStream xSignInStream );
+
+ /** allows to get the default stream name for storing of the signature of
+ the package.
+ */
+ string getPackageSignatureDefaultStreamName();
+
+
+ void showCertificate( [in] com::sun::star::security::XCertificate Certificate );
+
+
+ /** manages trusted sources (Authors and pathes )
+ */
+
+ void manageTrustedSources();
+ boolean isAuthorTrusted( [in] com::sun::star::security::XCertificate Author );
+ boolean isLocationTrusted( [in] string Location );
+
+ // These method should raise confirmation dialog, so it can not used from bad macros...
+ void addAuthorToTrustedSources( [in] com::sun::star::security::XCertificate Author );
+ void addLocationToTrustedSources( [in] string Location );
+
+
+
+} ;
+
+} ; } ; } ; } ;
+
+#endif
+
+
diff --git a/offapi/com/sun/star/security/XSerialNumberAdapter.idl b/offapi/com/sun/star/security/XSerialNumberAdapter.idl
new file mode 100644
index 000000000000..79a0e7be6f8b
--- /dev/null
+++ b/offapi/com/sun/star/security/XSerialNumberAdapter.idl
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XSerialNumberAdapter.idl,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/** -- idl definition -- **/
+
+#ifndef __com_sun_star_security_XSerialNumberAdapter_idl_
+#define __com_sun_star_security_XSerialNumberAdapter_idl_
+
+#include <com/sun/star/uno/XInterface.idl>
+
+module com { module sun { module star { module security {
+
+/**
+ * Interface of Certificate Serial Number Converter
+ *
+ * <p>This interface converts a certificate serial number to and from a string</p>
+ */
+interface XSerialNumberAdapter : com::sun::star::uno::XInterface
+{
+ /**
+ * Convert the SerialNumber to a string
+ */
+ string toString( [in]sequence< byte > SerialNumber );
+
+ /**
+ * Convert the SerialNumber to a sequence
+ */
+ sequence< byte > toSequence( [in]string SerialNumber );
+
+} ;
+
+} ; } ; } ; } ;
+
+#endif
+
diff --git a/offapi/com/sun/star/security/makefile.mk b/offapi/com/sun/star/security/makefile.mk
new file mode 100644
index 000000000000..75af0eb589ee
--- /dev/null
+++ b/offapi/com/sun/star/security/makefile.mk
@@ -0,0 +1,71 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.9 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+#i20156 - new file for xmlsecurity module
+
+PRJ=..$/..$/..$/..
+
+PRJNAME=offapi
+
+TARGET=xsec-security
+PACKAGE=com$/sun$/star$/security
+
+# --- Settings -----------------------------------------------------
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# ------------------------------------------------------------------------
+
+IDLFILES=\
+ CertificateException.idl \
+ CryptographyException.idl \
+ DocumentDigitalSignatures.idl \
+ DocumentSignatureInformation.idl \
+ EncryptionException.idl \
+ KeyException.idl \
+ NoPasswordException.idl \
+ SecurityInfrastructureException.idl \
+ SignatureException.idl \
+ XCertificate.idl \
+ CertificateCharacters.idl \
+ CertificateValidity.idl \
+ XCertificateExtension.idl \
+ XDocumentDigitalSignatures.idl \
+ KeyUsage.idl \
+ XCertificateContainer.idl \
+ XSerialNumberAdapter.idl \
+ SerialNumberAdapter.idl \
+ CertificateContainer.idl \
+ CertificateContainerStatus.idl
+
+# ------------------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk