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.KeyStore;
11 import java.net.URL;
12 import java.util.HashMap;
13
14 /***
15 *
16 * @author Peter Donald
17 * @version $Revision: 1.1 $ $Date: 2003/12/02 09:16:07 $
18 */
19 class TestPolicyBuilder
20 extends PolicyBuilder
21 {
22 protected KeyStore createKeyStore( String type,
23 URL url )
24 throws Exception
25 {
26 if( url.equals( new URL( "http://spice.sourceforge.net" ) ) )
27 {
28 final HashMap certs = new HashMap();
29 certs.put( "jenny", MockCertificate.JENNY_CERTIFICATE );
30 certs.put( "mischelle", MockCertificate.MISCHELLE_CERTIFICATE );
31 certs.put( "george", MockCertificate.GEORGE_CERTIFICATE );
32 return new MockKeyStore( certs );
33 }
34 else
35 {
36 throw new Exception( "Unable to create keystore " + url );
37 }
38 }
39 }
This page was automatically generated by Maven