1 13 14 package org.ejbca.core.model.ca.catoken; 15 16 import java.security.PrivateKey ; 17 import java.security.PublicKey ; 18 import java.util.Properties ; 19 20 import org.apache.log4j.Logger; 21 22 23 33 public class DummyHardCAToken implements IHardCAToken { 34 35 private static final Logger log = Logger.getLogger(DummyHardCAToken.class); 36 37 40 public DummyHardCAToken(){ 41 log.debug("Creating DummyHardCAToken"); 42 AvailableHardCAToken token = HardCATokenManager.instance().getAvailableHardCAToken("org.ejbca.core.ejb.ca.catoken.DummyHardCAToken"); 43 if (token != null) { 44 log.debug("Registered DummyHardCAToken succesfully."); 45 } 46 } 47 48 52 public void init(Properties properties, String signaturealgorithm) { 53 log.debug("Init()"); 54 } 56 57 58 65 public void activate(String authenticationcode) throws CATokenAuthenticationFailedException, CATokenOfflineException { 66 log.debug("activate(" + authenticationcode +")"); 67 } 69 70 76 public boolean deactivate(){ 77 log.debug("deactivate()"); 78 return true; 80 } 81 82 83 88 public PrivateKey getPrivateKey(int purpose) { 89 log.debug("getPrivateKey(" + purpose + ")"); 90 return null; 92 } 93 94 99 public PublicKey getPublicKey(int purpose) { 100 log.debug("getPublicKey(" + purpose + ")"); 101 return null; 103 } 104 105 106 107 111 public String getProvider() { 112 log.debug("getProvider()"); 113 return null; 115 } 116 117 122 public int getCATokenStatus() { 123 log.debug("getCATokenStatus()"); 124 return 0; 126 } 127 128 129 } 130 | Popular Tags |