public static byte [ ] encodeDN ( Codec codec , String distinguishedName ) throws Exception { X500Principal issuer = new X500Principal ( distinguishedName ) ; X509CertSelector certSelector = new X509CertSelector ( ) ; certSelector . setIssuer ( issuer ) ; byte [ ] asnX501DN = certSelector . getIssuerAsBytes ( ) ; Any a = ORB . init ( ) . create_any ( ) ; X501DistinguishedNameHelper . insert ( a , asnX501DN ) ; return codec . encode_value ( a ) ; }
Encode a distinguished name into a codec encoded ASN . 1 X501 encoded Distinguished Name .