org.jscep.util.X500Utils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jscep Show documentation
Show all versions of jscep Show documentation
Java implementation of the Simple Certificate Enrollment Protocol
package org.jscep.util;
import javax.security.auth.x500.X500Principal;
import org.bouncycastle.asn1.x500.X500Name;
/**
* This is a utility class for performing various operations pertaining to X.500
* objects.
*/
public final class X500Utils {
private X500Utils() {
}
/**
* Converts a Java SE X500Principal to a Bouncy Castle X500Name.
*
* @param principal
* the principal to convert.
* @return the converted name.
*/
public static X500Name toX500Name(final X500Principal principal) {
byte[] bytes = principal.getEncoded();
return X500Name.getInstance(bytes);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy