Package iaik.pkcs.pkcs12

Examples of iaik.pkcs.pkcs12.KeyBag


                String keySamBiz = bd.getBusinessEntity().get(0).getBusinessKey();
                //String keySamBizSvc = bd.getBusinessEntity().get(0).getBusinessServices().getBusinessService().get(0).getServiceKey();

                //transfers from Joe to Sam
                KeyBag kb = new KeyBag();
                kb.getKey().add(keyJoeBiz);

                Holder<String> nodeidOUT = new Holder<String>();
                Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                Holder<byte[]> tokenOUT = new Holder<byte[]>();
                custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here


        @Test
        public void InvalidTransferTokenNullKeybag() {
                try {
                        //transfers from Joe to Sam
                        KeyBag kb = null;

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
                        custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

        @Test
        public void InvalidTransferTokenEmptyKeybag() {
                try {
                        //transfers from Joe to Sam
                        KeyBag kb = new KeyBag();
                        //kb.getKey().add(keyJoeBiz);

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
View Full Code Here

                        BusinessDetail bd = publishJoe.saveBusiness(sb);

                        keyJoeBiz = bd.getBusinessEntity().get(0).getBusinessKey();

                        //transfers from Joe to Sam
                        KeyBag kb = new KeyBag();
                        kb.getKey().add(keyJoeBiz);

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
                        custodyTransferPortTypeJoe.getTransferToken(null, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

                        keySamBiz = bd.getBusinessEntity().get(0).getBusinessKey();
                        //String keySamBizSvc = bd.getBusinessEntity().get(0).getBusinessServices().getBusinessService().get(0).getServiceKey();

                        //transfers from Joe to Sam
                        KeyBag kb = new KeyBag();
                        kb.getKey().add(keyJoeBiz);

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
                        custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

        @Test
        public void InvalidTransferTokenServiceDoesntExist() throws Exception {
                try {
                        //transfers from Joe to Sam
                        KeyBag kb = new KeyBag();
                        kb.getKey().add("uddi:uddi.joepublisher.com:" + UUID.randomUUID().toString());

                        Holder<String> nodeidOUT = new Holder<String>();
                        Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                        Holder<byte[]> tokenOUT = new Holder<byte[]>();
                        custodyTransferPortTypeJoe.getTransferToken(authInfoJoe, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

                GregorianCalendar gcal = new GregorianCalendar();
                gcal.setTimeInMillis(System.currentTimeMillis());
                XMLGregorianCalendar xcal = df.newXMLGregorianCalendar(gcal);

                //Create a transfer token from fromUser to toUser
                KeyBag kb = new KeyBag();
                kb.getKey().add(BusinessKey);
                Holder<String> nodeidOUT = new Holder<String>();
                Holder<XMLGregorianCalendar> expiresOUT = new Holder<XMLGregorianCalendar>();
                Holder<byte[]> tokenOUT = new Holder<byte[]>();
                custodyTransferPortType.getTransferToken(fromUserAuthToken, kb, nodeidOUT, expiresOUT, tokenOUT);
View Full Code Here

  public void validateDiscardTransferToken(EntityManager em, DiscardTransferToken body) throws DispositionReportFaultMessage {
    // No null input
    if (body == null)
      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    KeyBag keyBag = body.getKeyBag();
   
    // The call must contain at least a transfer token or keyBag
    if (body.getTransferToken() == null && keyBag == null)
      throw new FatalErrorException(new ErrorMessage("errors.discardtransfertoken.NoInput"));
   
    if (keyBag != null) {
      List<String> keyList = keyBag.getKey();
      if (keyList == null || keyList.size() == 0)
        throw new ValueNotAllowedException(new ErrorMessage("errors.keybag.NoInput"));
     
      // Test that publisher owns keys using operational info.
      for (String key : keyList) {
View Full Code Here

   
    org.uddi.custody_v3.TransferToken apiTransferToken = body.getTransferToken();
    if (apiTransferToken == null)
      throw new FatalErrorException(new ErrorMessage("errors.transfertoken.NullInput"));
   
    KeyBag keyBag = body.getKeyBag();
    if (keyBag == null)
      throw new FatalErrorException(new ErrorMessage("errors.keybag.NullInput"));
   
    List<String> apiKeyList = keyBag.getKey();
    if (apiKeyList == null || apiKeyList.size() == 0)
      throw new ValueNotAllowedException(new ErrorMessage("errors.keybag.NoInput"));
   
    String transferTokenId = new String(apiTransferToken.getOpaqueToken());
    org.apache.juddi.model.TransferToken modelTransferToken = em.find(org.apache.juddi.model.TransferToken.class, transferTokenId);
View Full Code Here

        org.apache.juddi.model.TransferToken modelTransferToken = em.find(org.apache.juddi.model.TransferToken.class, transferTokenId);
        if (modelTransferToken != null)
          em.remove(modelTransferToken);
      }
     
      KeyBag keyBag = body.getKeyBag();
      if (keyBag != null) {
        List<String> keyList = keyBag.getKey();
        Vector<DynamicQuery.Parameter> params = new Vector<DynamicQuery.Parameter>(0);
        for (String key : keyList) {
          // Creating parameters for key-checking query
          DynamicQuery.Parameter param = new DynamicQuery.Parameter("UPPER(ttk.entityKey)",
                                        key.toUpperCase(),
View Full Code Here

TOP

Related Classes of iaik.pkcs.pkcs12.KeyBag

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.