public static X500Name toX500Name(final X500Principal principal) {
        byte[] bytes = principal.getEncoded();
        return X500Name.getInstance(bytes);
    }
public static X500Name toX500Name ( final X500Principal principal ) { byte [ ] bytes = principal . getEncoded ( ) ; return X500Name . getInstance ( bytes ) ; }
Converts a Java SE X500Principal to a Bouncy Castle X500Name.

@param principal
the principal to convert.
@return the converted name.