1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com
{ module sun
{ module star
{ module xml
{ module crypto
{
23 * Interface of Security Environment
25 interface XSecurityEnvironment
: com
::sun
::star
::uno
::XInterface
28 * Get personal certificates from the environment
30 sequence
< com
::sun
::star
::security
::XCertificate
> getPersonalCertificates
() raises
( com
::sun
::star
::uno
::SecurityException
) ;
33 * Get certificate from the environment by issuer name and serial number
35 com
::sun
::star
::security
::XCertificate getCertificate
( [in] string issuerName
, [in] sequence
< byte > serialNumber
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
38 * Build certificate path from a certain certificate
40 sequence
< com
::sun
::star
::security
::XCertificate
> buildCertificatePath
( [in] com
::sun
::star
::security
::XCertificate beginCert
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
43 * Create certificate interface from raw DER encoded certificate
45 com
::sun
::star
::security
::XCertificate createCertificateFromRaw
( [in] sequence
< byte > rawCertificate
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
48 * Create certificate interface from a Base64 encoded certificate.
50 com
::sun
::star
::security
::XCertificate createCertificateFromAscii
( [in] string asciiCertificate
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
55 The method provides a way to verify a certificate.
57 The certificate which is to be validated.
59 @param intermediateCertificates
60 Additional certificates which can be used by the method in constructing
61 the certificate chain. The root certificate may also be contained. However,
62 the implementation must check if the root certificate is indeed trusted by
64 All entries of the sequence must be non-null references.
67 The validation status will returned as a bit-wise long, please refer to
68 CertificateValidity definition.
70 long verifyCertificate
( [in] com
::sun
::star
::security
::XCertificate xEECertificate
,
71 [in] sequence
< com
::sun
::star
::security
::XCertificate
> intermediateCertificates
)
72 raises
( com
::sun
::star
::uno
::SecurityException
) ;
75 * Get a certificate characters.
77 * The method provides a way to get certificate characters like:
78 * 1. Whether or not the certificate have a private key in the user profile.
79 * 2. Whether or not the certificate is a trusted certificate.
80 * 3. Whether or not the certificate is a self-signed certificate.
82 * The certificate characters is defined as bit-wise long, please refer to
83 * CertificateCharacters definition.
85 long getCertificateCharacters
( [in] com
::sun
::star
::security
::XCertificate xCertificate
) raises
( com
::sun
::star
::uno
::SecurityException
) ;
88 * Get the Environment detail information
90 string getSecurityEnvironmentInformation
( );
93 * List all certificates, private (as returned by getPersonalCertificates) as well as those of other people/orgas
95 * @since LibreOffice 6.0
97 sequence
< com
::sun
::star
::security
::XCertificate
> getAllCertificates
() raises
( com
::sun
::star
::uno
::SecurityException
) ;
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */