Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / security / XCertificate.idl
blob22f7c6a4a1be53dc4e6abb939290d462aa256940
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #ifndef __com_sun_star_security_XCertificate_idl_
21 #define __com_sun_star_security_XCertificate_idl_
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/util/DateTime.idl>
25 #include <com/sun/star/security/XCertificateExtension.idl>
27 module com { module sun { module star { module security {
29 /**
30 * Interface of a PKI Certificate
32 * <p>This interface represents a x509 certificate.</p>
34 interface XCertificate : com::sun::star::uno::XInterface
36 /**
37 * the version number attribute of the certificate.
39 [attribute, readonly] short Version ;
41 /**
42 * the serial number attribute of the certificate.
44 [attribute, readonly] sequence< byte > SerialNumber ;
46 /**
47 * the issuer name attribute of the certificate.
49 [attribute, readonly] string IssuerName ;
51 /**
52 * the subject name attribute of the certificate.
54 [attribute, readonly] string SubjectName ;
56 /**
57 * the validity NotBefore date attribute of the certificate.
59 [attribute, readonly] com::sun::star::util::DateTime NotValidBefore ;
61 /**
62 * the validity NotAfter date attribute of the certificate.
64 [attribute, readonly] com::sun::star::util::DateTime NotValidAfter ;
66 /**
67 * the issuer unique ID attribute of the certificate.
69 [attribute, readonly] sequence< byte > IssuerUniqueID ;
71 /**
72 * the subject unique ID attribute of the certificate.
74 [attribute, readonly] sequence< byte > SubjectUniqueID ;
76 /**
77 * all extensions of a certificate.
79 [attribute, readonly] sequence< XCertificateExtension > Extensions ;
81 /**
82 * the DER encoded form of the certificate
84 [attribute, readonly] sequence< byte > Encoded ;
86 /**
87 * the algorithm of the subject public key
89 [attribute, readonly] string SubjectPublicKeyAlgorithm;
91 /**
92 * the value of the subject public key
94 [attribute, readonly] sequence< byte > SubjectPublicKeyValue;
96 /**
97 * the signature algorithm
99 [attribute, readonly] string SignatureAlgorithm;
102 * the SHA-1 thumbprint
104 [attribute, readonly] sequence< byte > SHA1Thumbprint;
107 * the MD5 thumbprint
109 [attribute, readonly] sequence< byte > MD5Thumbprint;
112 * Find a extension with a object identifier.
114 XCertificateExtension findCertificateExtension( [in]sequence< byte > oid ) ;
117 * get the certificate usage. The return value is a set of bits, as defined in RFC3280 for the
118 * KeyUsage BIT STRING. Note the bit and byte order used in ASN.1, so for instance the bit
119 * dataEncipherment in KeyUsage, "bit 3", corresponds to CERT_DATA_ENCIPHERMENT_KEY_USAGE in
120 * Win32 and KU_DATA_ENCIPHERMENT in NSS, both with value 0x10.
122 long getCertificateUsage();
125 } ; } ; } ; } ;
127 #endif
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */