1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XSecurityEnvironment.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 //i20156 - new file for xmlsecurity module
33 /** -- idl definition -- **/
35 #ifndef __com_sun_star_xml_crypto_xsecurityenvironment_idl_
36 #define __com_sun_star_xml_crypto_xsecurityenvironment_idl_
38 #ifndef __com_sun_star_uno_SecurityException_idl__
39 #include
<com
/sun
/star
/uno
/SecurityException.idl
>
42 #include
<com
/sun
/star
/uno
/XInterface.idl
>
43 #include
<com
/sun
/star
/uno
/Exception.idl
>
44 #include
<com
/sun
/star
/security
/XCertificate.idl
>
45 #include
<com
/sun
/star
/security
/CertificateCharacters.idl
>
46 #include
<com
/sun
/star
/security
/CertificateValidity.idl
>
48 module com
{ module sun
{ module star
{ module xml
{ module crypto
{
51 * Interface of Security Environment
53 interface XSecurityEnvironment
: com
::sun
::star
::uno
::XInterface
56 * Get personal certificate from the environment
58 sequence
< com
::sun
::star
::security
::XCertificate
> getPersonalCertificates
() raises
( com
::sun
::star
::uno
::SecurityException
) ;
61 * Get certificate from the environment by issuer name and serial number
63 com
::sun
::star
::security
::XCertificate getCertificate
( [in] string issuerName
, [in] sequence
< byte > serialNumber
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
66 * build certificate path from a certain certificate
68 sequence
< com
::sun
::star
::security
::XCertificate
> buildCertificatePath
( [in] com
::sun
::star
::security
::XCertificate beginCert
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
71 * Create certificate interface from raw DER encoded certificate
73 com
::sun
::star
::security
::XCertificate createCertificateFromRaw
( [in] sequence
< byte > rawCertificate
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
76 * Create certificate interface from a BASE64 encoded certificate.
78 com
::sun
::star
::security
::XCertificate createCertificateFromAscii
( [in] string asciiCertificate
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
83 The method provides a way to verify a certificate.
85 The certificate which is to be validated.
87 @param intermediateCertificates
88 Additional certificates which can be used by the method in constructing
89 the certificate chain. The root certificate may also be contained. However,
90 the implementation must check if the root certificate is indeed trusted by
92 All entries of the sequence must be non-null references.
95 The validation status will returned as a bit-wise long, please refer to
96 CertificateValidity definition.
98 long verifyCertificate
( [in] com
::sun
::star
::security
::XCertificate xEECertificate
,
99 [in] sequence
< com
::sun
::star
::security
::XCertificate
> intermediateCertificates
)
100 raises
( com
::sun
::star
::uno
::SecurityException
) ;
103 * Get a certificate characters.
105 * The method provides a way to get certificate characters like:
106 * 1. Whether or not the certificate have a private key in the user profile.
107 * 2. Whether or not the certificate is a trusted certificate.
108 * 3. Whether or not the certificate is a self-signed certificate.
110 * The certificate characters is defined as bit-wise long, please refer to
111 * CertificateCharacters definition.
113 long getCertificateCharacters
( [in] com
::sun
::star
::security
::XCertificate xCertificate
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
116 * Get the Environment detail infos
118 string getSecurityEnvironmentInformation
( );