本文整理汇总了Java中org.apache.ws.security.components.crypto.Crypto.getAliasForX509Cert方法的典型用法代码示例。如果您正苦于以下问题:Java Crypto.getAliasForX509Cert方法的具体用法?Java Crypto.getAliasForX509Cert怎么用?Java Crypto.getAliasForX509Cert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ws.security.components.crypto.Crypto
的用法示例。
在下文中一共展示了Crypto.getAliasForX509Cert方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getX509IssuerSerialAlias
import org.apache.ws.security.components.crypto.Crypto; //导入方法依赖的package包/类
/**
* Gets the alias name of the certificate identified with X509 issuerSerial data. The keystore
* identifies the certificate and the key with this alias name.
*
* @return the alias name for the certificate or null if nothing found
*/
public String getX509IssuerSerialAlias(Crypto crypto) throws WSSecurityException {
if (issuerSerial == null) {
issuerSerial = getIssuerSerial();
if (issuerSerial == null) {
return null;
}
}
String alias = crypto.getAliasForX509Cert(issuerSerial.getIssuerName(),
issuerSerial.getSerialNumber());
if (doDebug) {
log.info("X509IssuerSerial alias: " + alias);
}
return alias;
}
示例2: getX509SKIAlias
import org.apache.ws.security.components.crypto.Crypto; //导入方法依赖的package包/类
public String getX509SKIAlias(Crypto crypto) throws WSSecurityException {
if (skiBytes == null) {
skiBytes = getSKIBytes();
if (skiBytes == null) {
return null;
}
}
String alias = crypto.getAliasForX509Cert(skiBytes);
if (doDebug) {
log.info("X509 SKI alias: " + alias);
}
return alias;
}