Examples of DigSigUtil


Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                bt.setBindingKey(TckBusinessService.JOE_BINDING_KEY_1);
                bt.setServiceKey(null);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
                bs.getBindingTemplates().getBindingTemplate().add(bt);
                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bs = ds.signUddiEntity(bs);

                be.setBusinessServices(new BusinessServices());
                be.getBusinessServices().getBusinessService().add(bs);

                sb.getBusinessEntity().add(be);
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

        @Test()
        public void JUDDI_712_SaveTModelWithSignature() throws CertificateException {
                SaveTModel sb = new SaveTModel();
                sb.setAuthInfo(authInfoJoe);
                DigSigUtil ds = GetDigSig();
                TModel bs = new TModel();
                bs.setName(new Name("Joe's Tmodel", null));
                bs = ds.signUddiEntity(bs);

                sb.getTModel().add(bs);
                try {
                        publicationJoe.saveTModel(sb);
                        Assert.fail("unexpected success");
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                bt.setBindingKey(TckBusinessService.JOE_BINDING_KEY_1);
                bt.setServiceKey(null);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bt = ds.signUddiEntity(bt);
                bs.getBindingTemplates().getBindingTemplate().add(bt);
                be.setBusinessServices(new BusinessServices());
                be.getBusinessServices().getBusinessService().add(bs);

                sb.getBusinessEntity().add(be);
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                bt.setBindingKey(null);
                bt.setServiceKey(null);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bt = ds.signUddiEntity(bt);
                bs.getBindingTemplates().getBindingTemplate().add(bt);
                be.setBusinessServices(new BusinessServices());
                be.getBusinessServices().getBusinessService().add(bs);

                sb.getBusinessEntity().add(be);
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                bt.setBindingKey(null);
                bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bt = ds.signUddiEntity(bt);
                bs.getBindingTemplates().getBindingTemplate().add(bt);
                be.setBusinessServices(new BusinessServices());
                be.getBusinessServices().getBusinessService().add(bs);

                sb.getBusinessEntity().add(be);
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                bt.setBindingKey(null);
                bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bt = ds.signUddiEntity(bt);
                bs.getBindingTemplates().getBindingTemplate().add(bt);

                try {
                        SaveBinding sb1 = new SaveBinding();
                        sb1.setAuthInfo(authInfoJoe);
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);

                Name n = new Name();
                n.setValue("JUDDI_716_SaveBusinessWithSignatureX509IssuerSerial");
                be.getName().add(n);
                DigSigUtil ds = GetDigSig();
                ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SERIAL, "true");
                be = ds.signUddiEntity(be);
                sb.getBusinessEntity().add(be);
                BusinessDetail saveBusiness = null;
                try {
                        saveBusiness = publicationJoe.saveBusiness(sb);
                        GetBusinessDetail gsb = new GetBusinessDetail();
                        gsb.setAuthInfo(authInfoJoe);
                        gsb.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
                        BusinessDetail businessDetail = inquiryJoe.getBusinessDetail(gsb);
                        PrintUDDI<BusinessEntity> printer = new PrintUDDI<BusinessEntity>();
                        System.out.println(printer.print(businessDetail.getBusinessEntity().get(0)));
                        AtomicReference<String> msg = new AtomicReference<String>();
                        boolean b = ds.verifySignedUddiEntity(businessDetail.getBusinessEntity().get(0), msg);
                        Assert.assertTrue(msg.get(), b);
                        Assert.assertTrue(msg.get() == null || msg.get().length() == 0);

                } catch (Exception ex) {
                        logger.error("unExpected failure: ", ex);
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);

                Name n = new Name();
                n.setValue("JUDDI_716_SaveBusinessAllOptions");
                be.getName().add(n);
                DigSigUtil ds = GetDigSig();
                ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SERIAL, "true");
                ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SUBJECTDN, "true");
                be = ds.signUddiEntity(be);
                sb.getBusinessEntity().add(be);
                BusinessDetail saveBusiness = null;
                try {
                        saveBusiness = publicationJoe.saveBusiness(sb);
                        GetBusinessDetail gsb = new GetBusinessDetail();
                        gsb.setAuthInfo(authInfoJoe);
                        gsb.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
                        BusinessDetail businessDetail = inquiryJoe.getBusinessDetail(gsb);
                        PrintUDDI<BusinessEntity> printer = new PrintUDDI<BusinessEntity>();
                        System.out.println(printer.print(businessDetail.getBusinessEntity().get(0)));
                        AtomicReference<String> msg = new AtomicReference<String>();
                        boolean b = ds.verifySignedUddiEntity(businessDetail.getBusinessEntity().get(0), msg);
                        Assert.assertTrue(msg.get(), b);
                        Assert.assertTrue(msg.get() == null || msg.get().length() == 0);

                } catch (Exception ex) {
                        logger.error("unExpected failure: ", ex);
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

                        DeleteBusinesses(saveBusiness.getBusinessEntity().get(0).getBusinessKey(), authInfoJoe, publicationJoe);
                }
        }

        org.apache.juddi.v3.client.cryptor.DigSigUtil GetDigSig() throws CertificateException {
                org.apache.juddi.v3.client.cryptor.DigSigUtil ds = new DigSigUtil(TckPublisher.getProperties());
                /*
                ds.put(DigSigUtil.SIGNATURE_KEYSTORE_FILE, "./src/test/resources/keystore.jks");
                ds.put(DigSigUtil.SIGNATURE_KEYSTORE_FILETYPE, "JKS");
                ds.put(DigSigUtil.SIGNATURE_KEYSTORE_FILE_PASSWORD, "Test");
                ds.put(DigSigUtil.SIGNATURE_KEYSTORE_KEY_ALIAS, "Test");
                ds.put(DigSigUtil.TRUSTSTORE_FILE, "./src/test/resources/truststore.jks");
                ds.put(DigSigUtil.TRUSTSTORE_FILETYPE, "JKS");
                ds.put(DigSigUtil.TRUSTSTORE_FILE_PASSWORD, "Test");*/
                ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_BASE64, "true");
                return ds;
        }
View Full Code Here

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil

        ds.put(DigSigUtil.TRUSTSTORE_FILETYPE, "JKS");
        ds.put(DigSigUtil.TRUSTSTORE_FILE_PASSWORD, "Test");
    }

    void Default() throws CertificateException {
        ds = new DigSigUtil();
        SetCertStoreSettigns();
        ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_BASE64, "true");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.