Examples of TaggedComponent


Examples of org.omg.IOP.TaggedComponent

                    (short) sslPort);
            ORB orb = ORB.init();
            Any any = orb.create_any();
            SSLHelper.insert(any, ssl);
            byte[] componentData = codec.encode_value(any);
            defaultSSLComponent = new TaggedComponent(TAG_SSL_SEC_TRANS.value, componentData);
            defaultCSIComponent = CSIv2Util.createSecurityTaggedComponent(new IORSecurityConfigMetaData(), codec,
                    sslPort, orb);
        } catch (InvalidTypeForEncoding e) {
            throw JacORBMessages.MESSAGES.unexpectedException(e);
        }
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

        }

        boolean interopIONA = "on".equalsIgnoreCase(CorbaORBService.getORBProperty(JacORBSubsystemConstants.INTEROP_IONA));
        if (csiv2Policy != null) {
            // if csiv2Policy effective, stuff a copy of the TaggedComponents already created by the CSIv2Policy into the IOR's IIOP profile.
            TaggedComponent sslComponent = csiv2Policy.getSSLTaggedComponent();
            // if interop with IONA ASP is on, don't add the SSL component to the IOR.
            if (sslComponent != null && !interopIONA) {
                info.add_ior_component_to_profile(sslComponent, TAG_INTERNET_IOP.value);
            }
            TaggedComponent csiv2Component = csiv2Policy.getSecurityTaggedComponent();
            if (csiv2Component != null) {
                info.add_ior_component_to_profile(csiv2Component, TAG_INTERNET_IOP.value);
            }
        } else {
            if (defaultSSLComponent != null && !interopIONA) {
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

        super(codec);
    }

    public void establish_components(IORInfo info) {
        try {
            TaggedComponent mechanism_list = constructMechList(info);

            if (mechanism_list != null) {
                // add this component to all outgoing profiles!
                info.add_ior_component(mechanism_list);
            }
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

                                            | ITTDistinguishedName.value | ITTX509CertChain.value;
        }

        // transport mech is null here, this field is modified by code
        // inside SSL server-side logic, adding SSL-specific information.
        mech.transport_mech = new TaggedComponent(TAG_NULL_TAG.value,
                                                  EMPTY_BARR);
        mech.target_requires = (short) (as_target_requires | sas_target_requires);
        mech.as_context_mech = as;
        mech.sas_context_mech = sas;

        CompoundSecMechList mech_list = new CompoundSecMechList(false,
                                                                new CompoundSecMech[]{mech});

        Any a = getOrb().create_any();
        CompoundSecMechListHelper.insert(a, mech_list);
        byte[] mech_data;
        try {
            mech_data = codec.encode_value(a);
        }
        catch (InvalidTypeForEncoding e) {
            MARSHAL me = new MARSHAL("cannot encode security descriptor", 0,
                                     CompletionStatus.COMPLETED_NO);
            me.initCause(e);
            throw me;
        }
        return new TaggedComponent(TAG_CSI_SEC_MECH_LIST.value, mech_data);
    }
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

        boolean target_requires_gssup = false;

        CompoundSecMech mech = null;

        try {
            TaggedComponent tc = ri
                    .get_effective_component(TAG_CSI_SEC_MECH_LIST.value);

            byte[] data = tc.component_data;

            Any sl_any = codec.decode_value(data, CompoundSecMechListHelper
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

        //we could return just the profiles that match rather than bailing if one doesn't match.
        for (int i = 0; i< profileInfoSeq.value.length; i++ ) {
            TaggedComponent[] components = profileInfoSeq.value[i].components;
            byte[] otherTransportInfo = new byte[0];
            for (int j = 0; j < components.length; j++ ) {
                TaggedComponent component = components[j];
                if (component.tag == TAG_CSI_SEC_MECH_LIST.value) {
                    otherTransportInfo = component.component_data;
                    break;
                }
            }
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

    {
        TaggedComponentList result = (TaggedComponentList)super.clone();
        result.components = new TaggedComponent[this.components.length];
        for (int i=0; i<this.components.length; i++)
        {
            result.components[i] = new TaggedComponent
            (
                this.components[i].tag,
                new byte [this.components[i].component_data.length]
            );
            System.arraycopy (this.components[i].component_data, 0,
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

    /**
     * Adds a tagged component to this list.
     */
    public void addComponent (int tag, byte[] data)
    {
        addComponent (new TaggedComponent (tag, data));
    }
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

                sslDataStream.beginEncapsulatedArray();

                SSLHelper.write( sslDataStream , ssl );

                tc = new TaggedComponent( org.omg.SSLIOP.TAG_SSL_SEC_TRANS.value,
                                          sslDataStream.getBufferCopy() );

                sslDataStream.close ();
                sslDataStream = null;
            }
View Full Code Here

Examples of org.omg.IOP.TaggedComponent

        try
        {
            if( taggedComponent == null )
            {
                // for now, no transport mechanizms
                TaggedComponent transportMech =
                    new TaggedComponent(TAG_NULL_TAG.value, new byte[0]);

                // the AS_ContextSec
                byte[] targetName = sasContext.getClientPrincipal().getBytes();
                ServiceConfiguration[] serviceConfiguration = null;
                if (atlasValues == null)
                {
                    serviceConfiguration = new ServiceConfiguration[0];
                }
                else
                {
                    if (atlasValues.atlasCache == null)
                    {
                        atlasValues.atlasCache = "";
                    }
                    ATLASLocator atlasLoc = new ATLASLocator();
                    atlasLoc.the_url(atlasValues.atlasURL);
                    ATLASProfile profile = new ATLASProfile();
                    profile.the_cache_id = atlasValues.atlasCache.getBytes();
                    profile.the_locator = atlasLoc;
                    byte[] cdrProfile = new byte[0];
                    org.omg.CORBA.Any any = orb.create_any();
                    ATLASProfileHelper.insert( any, profile );
                    cdrProfile = codec.encode(any);
                    serviceConfiguration = new ServiceConfiguration[1];
                    serviceConfiguration[0] =
                        new ServiceConfiguration(SCS_ATLAS.value, cdrProfile);
                }
                SAS_ContextSec sasContextSec =
                    new SAS_ContextSec((short)0,
                                       (short)0,
                                       serviceConfiguration,
                                       new byte[0][0],
                                       0);

                // create the security mech list
                boolean useStateful =
                    config.getAttributeAsBoolean("jacorb.security.sas.stateful", true);

                CompoundSecMech[] compoundSecMech = new CompoundSecMech[1];
                Oid oid = new Oid(sasContext.getMechOID());
                byte[] clientAuthenticationMech = oid.getDER();

                AS_ContextSec asContextSec =
                    new AS_ContextSec(sasValues.targetSupports,
                                      sasValues.targetRequires,
                                      clientAuthenticationMech,
                                      targetName);
                compoundSecMech[0] =
                    new CompoundSecMech(sasValues.targetRequires,
                                        transportMech,
                                        asContextSec,
                                        sasContextSec);

                CompoundSecMechList compoundSecMechList =
                    new CompoundSecMechList(useStateful, compoundSecMech);

                // export to tagged component
                final CDROutputStream sasDataStream = new CDROutputStream( orb );

                try
                {
                    sasDataStream.beginEncapsulatedArray();
                    CompoundSecMechListHelper.write( sasDataStream , compoundSecMechList );
                    taggedComponent = new TaggedComponent( TAG_CSI_SEC_MECH_LIST.value,
                            sasDataStream.getBufferCopy() );
                }
                finally
                {
                    sasDataStream.close();
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.