diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /offapi/com/sun/star/security | |
parent | Initial commit. (diff) | |
download | libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/security')
22 files changed, 1444 insertions, 0 deletions
diff --git a/offapi/com/sun/star/security/CertAltNameEntry.idl b/offapi/com/sun/star/security/CertAltNameEntry.idl new file mode 100644 index 000000000..90252eea4 --- /dev/null +++ b/offapi/com/sun/star/security/CertAltNameEntry.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef __com_sun_star_security_CertAltNameEntry_idl__ +#define __com_sun_star_security_CertAltNameEntry_idl__ + +#include <com/sun/star/security/ExtAltNameType.idl> + + + module com { module sun { module star { module security { + +/** + * struct contains a single entry within a Subject Alternative Name Extension of a + * X509 certificate. + */ +struct CertAltNameEntry +{ + /** + * defines the type of the value. With this information you can determine how to interpret the Any value. + * @see com::sun::star::security::ExtAltNameType + */ + com::sun::star::security::ExtAltNameType Type; + + /** + * stores the value of entry. + */ + any Value; +}; + + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/CertificateCharacters.idl b/offapi/com/sun/star/security/CertificateCharacters.idl new file mode 100644 index 000000000..479547bee --- /dev/null +++ b/offapi/com/sun/star/security/CertificateCharacters.idl @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 definition 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/CertificateContainer.idl b/offapi/com/sun/star/security/CertificateContainer.idl new file mode 100644 index 000000000..0381fba69 --- /dev/null +++ b/offapi/com/sun/star/security/CertificateContainer.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_CertificateContainer_idl__ +#define __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> + +module com { module sun { module star { module security { + +/** the service to be used for XCertificateContainer. + @since OOo 2.3.1 +*/ +service CertificateContainer: XCertificateContainer; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/CertificateContainerStatus.idl b/offapi/com/sun/star/security/CertificateContainerStatus.idl new file mode 100644 index 000000000..01c16b568 --- /dev/null +++ b/offapi/com/sun/star/security/CertificateContainerStatus.idl @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 definition 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/CertificateException.idl b/offapi/com/sun/star/security/CertificateException.idl new file mode 100644 index 000000000..8be0a0daf --- /dev/null +++ b/offapi/com/sun/star/security/CertificateException.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_CertificateException_idl__ +#define __com_sun_star_security_CertificateException_idl__ + +#include <com/sun/star/uno/SecurityException.idl> + +module com { module sun { module star { module security { + + +exception CertificateException : com::sun::star::uno::SecurityException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/CertificateKind.idl b/offapi/com/sun/star/security/CertificateKind.idl new file mode 100644 index 000000000..111591866 --- /dev/null +++ b/offapi/com/sun/star/security/CertificateKind.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_security_CertificateKind_idl_ +#define __com_sun_star_security_CertificateKind_idl_ + +module com { module sun { module star { module security { + +/** + * Enum definition of a certificate kind ( X509, OpenPGP ) + * + * @since LibreOffice 5.4 + */ +enum CertificateKind +{ + /** X.509 format of a certificate + */ + X509, + + /** OpenPGP format of a certificate + */ + OPENPGP, + + /** No format specified + * + * @since LibreOffice 6.2 + */ + NONE +}; + +} ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/CertificateValidity.idl b/offapi/com/sun/star/security/CertificateValidity.idl new file mode 100644 index 000000000..c387b1828 --- /dev/null +++ b/offapi/com/sun/star/security/CertificateValidity.idl @@ -0,0 +1,122 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 definition 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/CryptographyException.idl b/offapi/com/sun/star/security/CryptographyException.idl new file mode 100644 index 000000000..b5bcf55f9 --- /dev/null +++ b/offapi/com/sun/star/security/CryptographyException.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef __com_sun_star_security_CryptographyException_idl__ +#define __com_sun_star_security_CryptographyException_idl__ + +#include <com/sun/star/uno/SecurityException.idl> + +module com { module sun { module star { module security { + + +exception CryptographyException : com::sun::star::uno::SecurityException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/DocumentDigitalSignatures.idl b/offapi/com/sun/star/security/DocumentDigitalSignatures.idl new file mode 100644 index 000000000..7c43b422c --- /dev/null +++ b/offapi/com/sun/star/security/DocumentDigitalSignatures.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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/security/XDocumentDigitalSignatures.idl> + +module com { module sun { module star { module security { + +/** + * Service of DocumentDigitalSignatures + */ + +service DocumentDigitalSignatures : XDocumentDigitalSignatures +{ + /* default constructor */ + createDefault(); + + /** + @param ODFVersion + the version of the signature + */ + createWithVersion([in] string ODFVersion); + + /** + @param ODFVersion + the version of the signature + + @param HasValidDocumentSignature + indicates if the document already contains a document signature. + + */ + createWithVersionAndValidSignature([in] string ODFVersion, + [in] boolean HasValidDocumentSignature); +}; + +} ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/DocumentSignatureInformation.idl b/offapi/com/sun/star/security/DocumentSignatureInformation.idl new file mode 100644 index 000000000..03b2e1f1d --- /dev/null +++ b/offapi/com/sun/star/security/DocumentSignatureInformation.idl @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_DocumentSignatureInformation_idl__ +#define __com_sun_star_security_DocumentSignatureInformation_idl__ + +#include <com/sun/star/graphic/XGraphic.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; + /** Time of day, in 100th of seconds. */ + long SignatureTime; + boolean SignatureIsValid; + /** + * Reflects the validity of the certificate. + * Contains a value from the constants of com::sun::star::security::CertificateValidity. + */ + 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 everything, except mimetype and the META-INF folder. + * <p> + * If PartialDocumentSignature is true, then the signature was created by OOo + * with a version lower than 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; + /** + * The ID of the Signature Line + * @since LibreOffice 6.0 + */ + string SignatureLineId; + /** + * The Signature Line Image which is shown when the signature is valid + * @since LibreOffice 6.0 + */ + com::sun::star::graphic::XGraphic ValidSignatureLineImage; + /** + * The Signature Line Image which is shown when the signature is invalid + * @since LibreOffice 6.0 + */ + com::sun::star::graphic::XGraphic InvalidSignatureLineImage; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/EncryptionException.idl b/offapi/com/sun/star/security/EncryptionException.idl new file mode 100644 index 000000000..54fab6530 --- /dev/null +++ b/offapi/com/sun/star/security/EncryptionException.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef __com_sun_star_security_EncryptionException_idl__ +#define __com_sun_star_security_EncryptionException_idl__ + +#include <com/sun/star/security/CryptographyException.idl> + +module com { module sun { module star { module security { + + +exception EncryptionException : com::sun::star::security::CryptographyException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/ExtAltNameType.idl b/offapi/com/sun/star/security/ExtAltNameType.idl new file mode 100644 index 000000000..e87308273 --- /dev/null +++ b/offapi/com/sun/star/security/ExtAltNameType.idl @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_ExtAltNameType_idl_ +#define __com_sun_star_security_ExtAltNameType_idl_ + +#include <com/sun/star/uno/XInterface.idl> + +module com { module sun { module star { module security { + +/** + * Constant definition of a certificate container status. + */ +enum ExtAltNameType +{ + /** + * Cutomize name/value pair + * The value of CertAltNameEntry contains a NamedValue. + * + * @see com::sun::star::security::CertAltNameEntry + */ + OTHER_NAME, + + /** + * The entry contains rfc822 name. + * The value of CertAltNameEntry contains an OUString. + * + * @see com::sun::star::security::CertAltNameEntry + */ + RFC822_NAME, + + /** + * The entry contains a dns name. + * The value of CertAltNameEntry contains a OUString. + * + * @see com::sun::star::security::CertAltNameEntry + */ + DNS_NAME, + + /** + * Currently unsupported. + */ + DIRECTORY_NAME, + + /** + * The entry contains a URL. + * The value of CertAltNameEntry contains a OUString. + * + * @see com::sun::star::security::CertAltNameEntry + */ + URL, + + /** + * The entry contains an IP address. + * The value of CertAltNameEntry contains a Sequence of sal_Int8. + * + * @see com::sun::star::security::CertAltNameEntry + */ + IP_ADDRESS, + + /** + * The entry contains a registered id. + * The value of CertAltNameEntry contains a OUString. + * + * @see com::sun::star::security::CertAltNameEntry + */ + REGISTERED_ID, + + /** + * Currently unsupported. + */ + EDI_PARTY_NAME, + + /** + * Currently unsupported. + */ + X400_ADDRESS + +}; + +} ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/KeyException.idl b/offapi/com/sun/star/security/KeyException.idl new file mode 100644 index 000000000..52ac23b7d --- /dev/null +++ b/offapi/com/sun/star/security/KeyException.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef __com_sun_star_security_KeyException_idl__ +#define __com_sun_star_security_KeyException_idl__ + +#include <com/sun/star/uno/SecurityException.idl> + +module com { module sun { module star { module security { + + +exception KeyException : com::sun::star::uno::SecurityException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/KeyUsage.idl b/offapi/com/sun/star/security/KeyUsage.idl new file mode 100644 index 000000000..1b6832c3b --- /dev/null +++ b/offapi/com/sun/star/security/KeyUsage.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/NoPasswordException.idl b/offapi/com/sun/star/security/NoPasswordException.idl new file mode 100644 index 000000000..497bd8f05 --- /dev/null +++ b/offapi/com/sun/star/security/NoPasswordException.idl @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef __com_sun_star_security_NoPasswordException_idl__ +#define __com_sun_star_security_NoPasswordException_idl__ + +#include <com/sun/star/uno/SecurityException.idl> + +module com { module sun { module star { module security { + +exception NoPasswordException : com::sun::star::uno::SecurityException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/SecurityInfrastructureException.idl b/offapi/com/sun/star/security/SecurityInfrastructureException.idl new file mode 100644 index 000000000..e2f6f4f74 --- /dev/null +++ b/offapi/com/sun/star/security/SecurityInfrastructureException.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_SecurityInfrastructureException_idl__ +#define __com_sun_star_security_SecurityInfrastructureException_idl__ + +#include <com/sun/star/uno/SecurityException.idl> + + + +module com { module sun { module star { module security { + + +exception SecurityInfrastructureException : com::sun::star::uno::SecurityException +{ +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/SignatureException.idl b/offapi/com/sun/star/security/SignatureException.idl new file mode 100644 index 000000000..d5353b705 --- /dev/null +++ b/offapi/com/sun/star/security/SignatureException.idl @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_SignatureException_idl__ +#define __com_sun_star_security_SignatureException_idl__ + +#include <com/sun/star/security/CryptographyException.idl> + +module com { module sun { module star { module security { + +exception SignatureException : com::sun::star::security::CryptographyException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/XCertificate.idl b/offapi/com/sun/star/security/XCertificate.idl new file mode 100644 index 000000000..7fd902738 --- /dev/null +++ b/offapi/com/sun/star/security/XCertificate.idl @@ -0,0 +1,137 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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> +#include <com/sun/star/security/CertificateKind.idl> + +module com { module sun { module star { module security { + +/** + * Interface of a PKI Certificate + * + * <p>This interface represents a certificate (X.509 or OpenPGP) .</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 SHA-1 thumbprint + */ + [attribute, readonly] sequence< byte > SHA1Thumbprint; + + /** + * the MD5 thumbprint + */ + [attribute, readonly] sequence< byte > MD5Thumbprint; + + /** + * the kind of certificate, X.509 or OpenPGP + * + * @since LibreOffice 5.4 + */ + [attribute, readonly] com::sun::star::security::CertificateKind CertificateKind; + + /** + * Find an extension with an object identifier. + */ + XCertificateExtension findCertificateExtension( [in]sequence< byte > oid ) ; + + /** + * get the certificate usage. The return value is a set of bits, as defined in RFC3280 for the + * KeyUsage BIT STRING. Note the bit and byte order used in ASN.1, so for instance the bit + * dataEncipherment in KeyUsage, "bit 3", corresponds to CERT_DATA_ENCIPHERMENT_KEY_USAGE in + * Win32 and KU_DATA_ENCIPHERMENT in NSS, both with value 0x10. + */ + long getCertificateUsage(); +} ; + +} ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/XCertificateContainer.idl b/offapi/com/sun/star/security/XCertificateContainer.idl new file mode 100644 index 000000000..f98529d96 --- /dev/null +++ b/offapi/com/sun/star/security/XCertificateContainer.idl @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_XCertificateContainer_idl__ +#define __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 ); + + /** Check if a certificate was stored earlier before. + @param url + @param cert + @return CertificateContainerStatus + + */ + + CertificateContainerStatus hasCertificate([in] string url, + [in] string cert ); + +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/XCertificateExtension.idl b/offapi/com/sun/star/security/XCertificateExtension.idl new file mode 100644 index 000000000..8ea7e77b6 --- /dev/null +++ b/offapi/com/sun/star/security/XCertificateExtension.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl new file mode 100644 index 000000000..1eb262775 --- /dev/null +++ b/offapi/com/sun/star/security/XDocumentDigitalSignatures.idl @@ -0,0 +1,232 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_XDocumentDigitalSignatures_idl_ +#define __com_sun_star_security_XDocumentDigitalSignatures_idl_ + +#include <com/sun/star/awt/XWindow.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 digitally sign different content in an 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); + + /** Signs the content of the document including text and pictures + using the given XCertificate. + + Also adds the given Signature Line Id and the signed and unsigned graphics to + the signature. + + Macros will not be signed. + + @since LibreOffice 6.1 + */ + boolean signSignatureLine( [in] ::com::sun::star::embed::XStorage xStorage, + [in] ::com::sun::star::io::XStream xSignStream, + [in] string signatureLineId, + [in] ::com::sun::star::security::XCertificate xCertificate, + [in] ::com::sun::star::graphic::XGraphic xValidGraphic, + [in] ::com::sun::star::graphic::XGraphic xInvalidGraphic, + [in] string comment); + + /** 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 except 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 paths ) + */ + void manageTrustedSources(); + boolean isAuthorTrusted( [in] com::sun::star::security::XCertificate Author ); + boolean isLocationTrusted( [in] string Location ); + + // These methods should raise a confirmation dialog, so they can not be misused from bad macros. + void addAuthorToTrustedSources( [in] com::sun::star::security::XCertificate Author ); + void addLocationToTrustedSources( [in] string Location ); + + /** This method shows the CertificateChooser dialog, used by document and PDF signing + Shows only private certificates + + @since LibreOffice 5.3 + */ + com::sun::star::security::XCertificate chooseCertificate( [out] string Description ); + + /** This is an alias for 'chooseCertificate', shows the CertificateChooser dialog + with private certificates + + @since LibreOffice 6.0 + */ + com::sun::star::security::XCertificate chooseSigningCertificate( [out] string Description ); + + /** This shows the certificate selection dialog and allows to only select the certificate + without actually signing the document. + + @since LibreOffice 6.1 + */ + com::sun::star::security::XCertificate selectSigningCertificate( [out] string Description ); + + /** This shows the certificate selection dialog and allows to only select the certificate + without actually signing the document. Only certificates of the given type will be shown. + + @since LibreOffice 6.2 + */ + com::sun::star::security::XCertificate selectSigningCertificateWithType( + [in] CertificateKind certificateKind, + [out] string Description); + + /** This method shows the CertificateChooser dialog with all certificates, private and + other people's. Useful when choosing certificate/key for encryption + + @since LibreOffice 6.0 + */ + sequence< com::sun::star::security::XCertificate > chooseEncryptionCertificate( ); + + /** This method shows the CertificateChooser dialog, used by document and PDF signing + Shows only private certificates and returns usage string in addition to description. + + @since LibreOffice 6.0 + */ + com::sun::star::security::XCertificate chooseCertificateWithProps( [out] sequence<::com::sun::star::beans::PropertyValue> Properties); + + /** Signs the content of the document with the provided certificate. + + @since LibreOffice 6.2 + */ + boolean signDocumentWithCertificate([in] ::com::sun::star::security::XCertificate xCertificate, + [in] ::com::sun::star::embed::XStorage xStorage, + [in] ::com::sun::star::io::XStream xStream); + + /** Set parent window to use when showing dialogs + + @since LibreOffice 6.3 + */ + void setParentWindow([in] ::com::sun::star::awt::XWindow xParentWindow); + + /** signs the content of the Scripting including macros and basic dialogs with the provided certificate. + + <p>The rest of document content will not be signed.</p> + + @since LibreOffice 7.0 + */ + boolean signScriptingContentWithCertificate([in] ::com::sun::star::security::XCertificate xCertificate, + [in] ::com::sun::star::embed::XStorage xStorage, + [in] ::com::sun::star::io::XStream xStream); + + /** signs the full Package, which means everything in the storage except the content of META-INF with the provided certificate. + + @since LibreOffice 7.0 + */ + boolean signPackageWithCertificate([in] ::com::sun::star::security::XCertificate xCertificate, + [in] ::com::sun::star::embed::XStorage xStorage, + [in] ::com::sun::star::io::XStream xStream); +}; + +} ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/security/XSanExtension.idl b/offapi/com/sun/star/security/XSanExtension.idl new file mode 100644 index 000000000..fbfbee31c --- /dev/null +++ b/offapi/com/sun/star/security/XSanExtension.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_security_XSanExtension_idl_ +#define __com_sun_star_security_XSanExtension_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/security/XCertificateExtension.idl> +#include <com/sun/star/security/CertAltNameEntry.idl> + +module com { module sun { module star { module security { + +/** + * Interface of a X509 Subject Alternative Name Certificate Extension + * + * <p>This interface represents a x509 certificate extension.</p> + */ +interface XSanExtension : com::sun::star::security::XCertificateExtension +{ + /** + * Contains the alternative names of a certificate + */ + [attribute, readonly] sequence< com::sun::star::security::CertAltNameEntry > AlternativeNames; +}; + +} ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |