Home | History | Annotate | Download | only in support
      1 /*
      2  * Licensed to the Apache Software Foundation (ASF) under one or more
      3  * contributor license agreements.  See the NOTICE file distributed with
      4  * this work for additional information regarding copyright ownership.
      5  * The ASF licenses this file to You under the Apache License, Version 2.0
      6  * (the "License"); you may not use this file except in compliance with
      7  * the License.  You may obtain a copy of the License at
      8  *
      9  *     http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 package tests.support;
     19 
     20 import java.io.IOException;
     21 import java.io.InputStream;
     22 import java.io.OutputStream;
     23 import java.security.Key;
     24 import java.security.KeyStoreException;
     25 import java.security.KeyStoreSpi;
     26 import java.security.NoSuchAlgorithmException;
     27 import java.security.UnrecoverableKeyException;
     28 import java.security.cert.Certificate;
     29 import java.security.cert.CertificateException;
     30 import java.util.Date;
     31 import java.util.Enumeration;
     32 
     33 /**
     34  * Empty implementation used to enable unit tests to run.
     35  */
     36 public class Support_DummyPKCS12Keystore extends KeyStoreSpi {
     37 
     38     public Support_DummyPKCS12Keystore() {
     39         super();
     40     }
     41 
     42     @Override
     43     public Key engineGetKey(String arg0, char[] arg1)
     44             throws NoSuchAlgorithmException, UnrecoverableKeyException {
     45         return null;
     46     }
     47 
     48     @Override
     49     public Certificate[] engineGetCertificateChain(String arg0) {
     50         return null;
     51     }
     52 
     53     @Override
     54     public Certificate engineGetCertificate(String arg0) {
     55         return null;
     56     }
     57 
     58     @Override
     59     public Date engineGetCreationDate(String arg0) {
     60         return null;
     61     }
     62 
     63     @Override
     64     public void engineSetKeyEntry(String arg0, Key arg1, char[] arg2,
     65             Certificate[] arg3) throws KeyStoreException {
     66     }
     67 
     68     @Override
     69     public void engineSetKeyEntry(String arg0, byte[] arg1, Certificate[] arg2)
     70             throws KeyStoreException {
     71     }
     72 
     73     @Override
     74     public void engineSetCertificateEntry(String arg0, Certificate arg1)
     75             throws KeyStoreException {
     76     }
     77 
     78     @Override
     79     public void engineDeleteEntry(String arg0) throws KeyStoreException {
     80     }
     81 
     82     @Override
     83     public Enumeration<String> engineAliases() {
     84         return null;
     85     }
     86 
     87     @Override
     88     public boolean engineContainsAlias(String arg0) {
     89         return false;
     90     }
     91 
     92     @Override
     93     public int engineSize() {
     94         return 0;
     95     }
     96 
     97     @Override
     98     public boolean engineIsKeyEntry(String arg0) {
     99         return false;
    100     }
    101 
    102     @Override
    103     public boolean engineIsCertificateEntry(String arg0) {
    104         return false;
    105     }
    106 
    107     @Override
    108     public String engineGetCertificateAlias(Certificate arg0) {
    109         return null;
    110     }
    111 
    112     @Override
    113     public void engineStore(OutputStream arg0, char[] arg1) throws IOException,
    114             NoSuchAlgorithmException, CertificateException {
    115     }
    116 
    117     @Override
    118     public void engineLoad(InputStream arg0, char[] arg1) throws IOException,
    119             NoSuchAlgorithmException, CertificateException {
    120     }
    121 }
    122