Search in sources :

Example 1 with ORB

use of com.sun.corba.se.spi.orb.ORB in project wildfly by wildfly.

the class CSIV2IORToSocketInfo method getSSL.

private SSL getSSL(IOR ior) {
    Iterator iter = ior.getProfile().getTaggedProfileTemplate().iteratorById(TAG_SSL_SEC_TRANS.value);
    if (!iter.hasNext()) {
        return null;
    }
    ORB orb = ior.getORB();
    TaggedComponent compList = ((com.sun.corba.se.spi.ior.TaggedComponent) iter.next()).getIOPComponent(orb);
    CDRInputStream in = doPrivileged(new PrivilegedAction<CDRInputStream>() {

        @Override
        public CDRInputStream run() {
            return new EncapsInputStream(orb, compList.component_data, compList.component_data.length);
        }
    });
    in.consumeEndian();
    SSL ssl = SSLHelper.read(in);
    boolean targetRequiresSsl = ssl.target_requires > 0;
    boolean targetSupportsSsl = ssl.target_supports > 0;
    if (!targetSupportsSsl && clientRequiresSsl) {
        throw IIOPLogger.ROOT_LOGGER.serverDoesNotSupportSsl();
    }
    return targetSupportsSsl && (targetRequiresSsl || clientRequiresSsl) ? ssl : null;
}
Also used : TaggedComponent(org.omg.IOP.TaggedComponent) CDRInputStream(com.sun.corba.se.impl.encoding.CDRInputStream) EncapsInputStream(com.sun.corba.se.impl.encoding.EncapsInputStream) Iterator(java.util.Iterator) SSL(org.omg.SSLIOP.SSL) ORB(com.sun.corba.se.spi.orb.ORB)

Example 2 with ORB

use of com.sun.corba.se.spi.orb.ORB in project wildfly by wildfly.

the class CSIV2IORToSocketInfo method extractTlsSecTrans.

private TLS_SEC_TRANS extractTlsSecTrans(IOR ior, CompoundSecMech mech) {
    TaggedComponent comp = mech.transport_mech;
    if (comp.tag != TAG_TLS_SEC_TRANS.value) {
        return null;
    }
    ORB orb = ior.getORB();
    CDRInputStream in = doPrivileged(new PrivilegedAction<CDRInputStream>() {

        @Override
        public CDRInputStream run() {
            return new EncapsInputStream(orb, comp.component_data, comp.component_data.length);
        }
    });
    in.consumeEndian();
    return TLS_SEC_TRANSHelper.read(in);
}
Also used : TaggedComponent(org.omg.IOP.TaggedComponent) CDRInputStream(com.sun.corba.se.impl.encoding.CDRInputStream) EncapsInputStream(com.sun.corba.se.impl.encoding.EncapsInputStream) ORB(com.sun.corba.se.spi.orb.ORB)

Example 3 with ORB

use of com.sun.corba.se.spi.orb.ORB in project wildfly by wildfly.

the class CSIV2IORToSocketInfo method readCompoundSecMechList.

private CompoundSecMechList readCompoundSecMechList(IOR ior) {
    Iterator iter = ior.getProfile().getTaggedProfileTemplate().iteratorById(TAG_CSI_SEC_MECH_LIST.value);
    if (!iter.hasNext()) {
        return null;
    }
    ORB orb = ior.getORB();
    TaggedComponent compList = ((com.sun.corba.se.spi.ior.TaggedComponent) iter.next()).getIOPComponent(orb);
    CDRInputStream in = doPrivileged(new PrivilegedAction<CDRInputStream>() {

        @Override
        public CDRInputStream run() {
            return new EncapsInputStream(orb, compList.component_data, compList.component_data.length);
        }
    });
    in.consumeEndian();
    return CompoundSecMechListHelper.read(in);
}
Also used : TaggedComponent(org.omg.IOP.TaggedComponent) CDRInputStream(com.sun.corba.se.impl.encoding.CDRInputStream) EncapsInputStream(com.sun.corba.se.impl.encoding.EncapsInputStream) Iterator(java.util.Iterator) ORB(com.sun.corba.se.spi.orb.ORB)

Aggregations

CDRInputStream (com.sun.corba.se.impl.encoding.CDRInputStream)3 EncapsInputStream (com.sun.corba.se.impl.encoding.EncapsInputStream)3 ORB (com.sun.corba.se.spi.orb.ORB)3 TaggedComponent (org.omg.IOP.TaggedComponent)3 Iterator (java.util.Iterator)2 SSL (org.omg.SSLIOP.SSL)1