1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.crypto.pkix

File CertificateProvider.java

 

Code metrics

0
0
0
1
73
14
0
-
-
0
-

Classes

Class Line # Actions
CertificateProvider 37 0 - 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20   
21    package org.xwiki.crypto.pkix;
22   
23    import java.math.BigInteger;
24    import java.util.Collection;
25   
26    import org.xwiki.component.annotation.Role;
27    import org.xwiki.crypto.pkix.params.CertifiedPublicKey;
28    import org.xwiki.crypto.pkix.params.PrincipalIndentifier;
29   
30    /**
31    * Provides certificates.
32    *
33    * @version $Id: bf279206aa21d85ab32a4ff42298e59c9bae28b1 $
34    * @since 6.0M1
35    */
36    @Role
 
37    public interface CertificateProvider
38    {
39    /**
40    * Return if available a certificate matching the given keyIdentifier.
41    *
42    * @param keyIdentifier the subject key identifier of the certificate.
43    * @return a matching certificate or null if none were found.
44    */
45    CertifiedPublicKey getCertificate(byte[] keyIdentifier);
46   
47    /**
48    * Return if available a certificate matching the given keyIdentifier.
49    *
50    * @param issuer the subject of the issuer of the certificate.
51    * @param serial the serial number attributed by the issuer to the certificate.
52    * @return a matching certificate or null if none were found.
53    */
54    CertifiedPublicKey getCertificate(PrincipalIndentifier issuer, BigInteger serial);
55   
56    /**
57    * Return if available a certificate matching the given keyIdentifier.
58    *
59    * @param issuer the subject of the issuer of the certificate.
60    * @param serial the serial number attributed by the issuer to the certificate.
61    * @param keyIdentifier the subject key identifier of the certificate.
62    * @return a matching certificate or null if none were found.
63    */
64    CertifiedPublicKey getCertificate(PrincipalIndentifier issuer, BigInteger serial, byte[] keyIdentifier);
65   
66    /**
67    * Return if available a collection of certificate matching the given subject.
68    *
69    * @param subject the subject of the certificate.
70    * @return a collection of matching certificate or null if none were found.
71    */
72    Collection<CertifiedPublicKey> getCertificate(PrincipalIndentifier subject);
73    }