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