Package org.ejbca.core.protocol.ws.objects

Examples of org.ejbca.core.protocol.ws.objects.PinDataWS



    if(data.getHardToken() instanceof SwedishEIDHardToken){
      SwedishEIDHardToken ht = (SwedishEIDHardToken) data.getHardToken();
      if(includePUK){
        retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_SIGNATURE,ht.getInitialSignaturePIN(),ht.getSignaturePUK()));
        retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_BASIC,ht.getInitialAuthEncPIN(),ht.getAuthEncPUK()));
      }
      retval.setTokenType(HardTokenConstants.TOKENTYPE_SWEDISHEID);
      return retval;
    }
    if(data.getHardToken() instanceof EnhancedEIDHardToken){
      EnhancedEIDHardToken ht = (EnhancedEIDHardToken) data.getHardToken();
      retval.setEncKeyKeyRecoverable(ht.getEncKeyRecoverable());
      if(includePUK){
        retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_SIGNATURE,ht.getInitialSignaturePIN(),ht.getSignaturePUK()));
        retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_BASIC,ht.getInitialAuthPIN(),ht.getAuthPUK()));
      }
      retval.setTokenType(HardTokenConstants.TOKENTYPE_ENHANCEDEID);
      return retval;
    }
    if(data.getHardToken() instanceof TurkishEIDHardToken){
      TurkishEIDHardToken ht = (TurkishEIDHardToken) data.getHardToken();
      if(includePUK){
        retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_BASIC,ht.getInitialPIN(),ht.getPUK()));
      }
      retval.setTokenType(HardTokenConstants.TOKENTYPE_TURKISHEID);
      return retval;
    }
    throw new EjbcaException(ErrorCode.INTERNAL_ERROR,
View Full Code Here


    String signaturePUK = "";
    String basicInitialPIN = "";
    String basicPUK = "";
    Iterator<PinDataWS> iter = hardTokenDataWS.getPinDatas().iterator();
    while(iter.hasNext()){
      PinDataWS pinData = iter.next();
      switch(pinData.getType()){
      case HardTokenConstants.PINTYPE_BASIC :
        basicInitialPIN = pinData.getInitialPIN();
        basicPUK = pinData.getPUK();
        break;
      case HardTokenConstants.PINTYPE_SIGNATURE :
        signatureInitialPIN = pinData.getInitialPIN();
        signaturePUK = pinData.getPUK();
        break;
      default :
        throw EjbcaWSHelper.getEjbcaException("Unsupported PIN Type " + pinData.getType(),
          logger, ErrorCode.NOT_SUPPORTED_PIN_TYPE, null);
      }
    }
    int tokenType = SwedishEIDHardToken.THIS_TOKENTYPE;
    switch (hardTokenDataWS.getTokenType()){
View Full Code Here

TOP

Related Classes of org.ejbca.core.protocol.ws.objects.PinDataWS

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.