1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_security_XCertificate_idl_
25#define __com_sun_star_security_XCertificate_idl_
26
27#include <com/sun/star/uno/XInterface.idl>
28#include <com/sun/star/util/DateTime.idl>
29#include <com/sun/star/security/XCertificateExtension.idl>
30
31module com { module sun { module star { module security {
32
33/**
34 * Interface of a PKI Certificate
35 *
36 * <p>This interface represents a x509 certificate.</p>
37 */
38published interface XCertificate : com::sun::star::uno::XInterface
39{
40    /**
41     * the version number attribute of the certificate.
42     */
43    [attribute, readonly] short Version ;
44
45    /**
46     * the serial number attribute of the certificate.
47     */
48    [attribute, readonly] sequence< byte > SerialNumber ;
49
50    /**
51     * the issuer name attribute of the certificate.
52     */
53    [attribute, readonly] string IssuerName ;
54
55    /**
56     * the subject name attribute of the certificate.
57     */
58    [attribute, readonly] string SubjectName ;
59
60    /**
61     * the validity NotBefore date attribute of the certificate.
62     */
63    [attribute, readonly] com::sun::star::util::DateTime NotValidBefore ;
64
65    /**
66     * the validity NotAfter date attribute of the certificate.
67     */
68    [attribute, readonly] com::sun::star::util::DateTime NotValidAfter ;
69
70    /**
71     * the issuer unique ID attribute of the certificate.
72     */
73    [attribute, readonly] sequence< byte > IssuerUniqueID ;
74
75    /**
76     * the subject unique ID attribute of the certificate.
77     */
78    [attribute, readonly] sequence< byte > SubjectUniqueID ;
79
80    /**
81     * all extensions of a certificate.
82     */
83    [attribute, readonly] sequence< XCertificateExtension > Extensions ;
84
85    /**
86     * the DER encoded form of the certificate
87     */
88    [attribute, readonly] sequence< byte > Encoded ;
89
90    /**
91     * the algorithm of the subject public key
92     */
93    [attribute, readonly] string SubjectPublicKeyAlgorithm;
94
95    /**
96     * the value of the subject public key
97     */
98    [attribute, readonly] sequence< byte > SubjectPublicKeyValue;
99
100    /**
101     * the signature algorithm
102     */
103    [attribute, readonly] string SignatureAlgorithm;
104
105    /**
106     * the SHA1 thumbprint
107     */
108    [attribute, readonly] sequence< byte > SHA1Thumbprint;
109
110    /**
111     * the MD5 thumbprint
112     */
113    [attribute, readonly] sequence< byte > MD5Thumbprint;
114
115    /**
116     * Find a extension with a object identifier.
117     */
118    XCertificateExtension findCertificateExtension( [in]sequence< byte > oid ) ;
119
120    /**
121     * get the certificate usage
122     */
123    long getCertificateUsage();
124} ;
125
126} ; } ; } ; } ;
127
128#endif
129
130