1 /* 2 * Copyright (C) The Spice Group. All rights reserved. 3 * 4 * This software is published under the terms of the Spice 5 * Software License version 1.1, a copy of which has been included 6 * with this distribution in the LICENSE.txt file. 7 */ 8 package org.codehaus.spice.xmlpolicy.builder; 9 10 import java.security.InvalidKeyException; 11 import java.security.NoSuchAlgorithmException; 12 import java.security.NoSuchProviderException; 13 import java.security.PublicKey; 14 import java.security.SignatureException; 15 import java.security.cert.Certificate; 16 import java.security.cert.CertificateEncodingException; 17 import java.security.cert.CertificateException; 18 19 /*** 20 * 21 * @author Peter Donald 22 * @version $Revision: 1.1 $ $Date: 2003/12/02 09:16:07 $ 23 */ 24 class MockCertificate 25 extends Certificate 26 { 27 public static final MockCertificate JENNY_CERTIFICATE = new MockCertificate("jenny"); 28 public static final MockCertificate MISCHELLE_CERTIFICATE = new MockCertificate("mischelle"); 29 public static final MockCertificate GEORGE_CERTIFICATE = new MockCertificate("george"); 30 31 private final String m_name; 32 33 public MockCertificate(final String name ) 34 { 35 super( "name" ); 36 m_name = name; 37 } 38 39 public byte[] getEncoded() 40 throws CertificateEncodingException 41 { 42 return new byte[ 0 ]; 43 } 44 45 public void verify( PublicKey key ) 46 throws CertificateException, NoSuchAlgorithmException, 47 InvalidKeyException, NoSuchProviderException, 48 SignatureException 49 { 50 } 51 52 public void verify( PublicKey key, String sigProvider ) 53 throws CertificateException, NoSuchAlgorithmException, 54 InvalidKeyException, NoSuchProviderException, 55 SignatureException 56 { 57 } 58 59 public String toString() 60 { 61 return m_name; 62 } 63 64 public PublicKey getPublicKey() 65 { 66 return null; 67 } 68 }

This page was automatically generated by Maven