private static TaggedComponent createTlsTransportMech( short targetSupports, short targetRequires, int port )
{
CDROutputStream out = new CDROutputStream();
try
{
out.beginEncapsulatedArray();
TLS_SEC_TRANS tls = new TLS_SEC_TRANS( targetSupports, targetRequires, new TransportAddress[] { new TransportAddress( "local", (short) (port & 0x0ffff) )} );
TLS_SEC_TRANSHelper.write( out, tls );
return new TaggedComponent( TAG_TLS_SEC_TRANS.value, out.getBufferCopy() );
}
finally