本文整理匯總了Java中org.globus.gsi.bc.X509NameHelper類的典型用法代碼示例。如果您正苦於以下問題:Java X509NameHelper類的具體用法?Java X509NameHelper怎麽用?Java X509NameHelper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
X509NameHelper類屬於org.globus.gsi.bc包,在下文中一共展示了X509NameHelper類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: toGlobusID
import org.globus.gsi.bc.X509NameHelper; //導入依賴的package包/類
/**
* Converts the specified principal into Globus format.
* If the principal is of unrecognized type a simple string-based
* conversion is made using the {@link #toGlobusID(String) toGlobusID()}
* function.
*
* @see #toGlobusID(String)
*
* @param name the principal to convert to Globus format.
* @return the converted DN in Globus format.
*/
public static String toGlobusID(Principal name) {
if (name instanceof X509Name) {
return X509NameHelper.toString((X509Name)name);
} else {
return CertUtil.toGlobusID(name.getName());
}
}