本文整理了Java中org.opensaml.xml.signature.X509Certificate.getValue()
方法的一些代码示例,展示了X509Certificate.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509Certificate.getValue()
方法的具体详情如下:
包路径:org.opensaml.xml.signature.X509Certificate
类名称:X509Certificate
方法名:getValue
暂无
代码示例来源:origin: org.springframework.security.extensions/spring-security-saml2-core
/**
* Parses list of Base64 encoded certificates present in the X509Data element.
*
* @param x509Data data to parse
* @return list with 0..n certificates
*/
public static List<String> getBase64EncodedCertificates(X509Data x509Data) {
List<String> certList = new LinkedList<String>();
if (x509Data == null) {
return certList;
}
for (org.opensaml.xml.signature.X509Certificate xmlCert : x509Data.getX509Certificates()) {
if (xmlCert != null && xmlCert.getValue() != null) {
certList.add(xmlCert.getValue());
}
}
return certList;
}
代码示例来源:origin: org.opensaml/xmltooling
/**
* Convert an {@link org.opensaml.xml.signature.X509Certificate} into a native Java representation.
*
* @param xmlCert an {@link org.opensaml.xml.signature.X509Certificate}
*
* @return a {@link java.security.cert.X509Certificate}
*
* @throws CertificateException thrown if there is a problem converting the
* X509 data into {@link java.security.cert.X509Certificate}s.
*/
public static X509Certificate getCertificate(org.opensaml.xml.signature.X509Certificate xmlCert)
throws CertificateException {
if (xmlCert == null || xmlCert.getValue() == null) {
return null;
}
Collection<X509Certificate> certs = X509Util.decodeCertificate(Base64.decode(xmlCert.getValue()));
if (certs != null && certs.iterator().hasNext()) {
return certs.iterator().next();
} else {
return null;
}
}
代码示例来源:origin: io.apigee.opensaml/xmltooling
/**
* Convert an {@link org.opensaml.xml.signature.X509Certificate} into a native Java representation.
*
* @param xmlCert an {@link org.opensaml.xml.signature.X509Certificate}
*
* @return a {@link java.security.cert.X509Certificate}
*
* @throws CertificateException thrown if there is a problem converting the
* X509 data into {@link java.security.cert.X509Certificate}s.
*/
public static X509Certificate getCertificate(org.opensaml.xml.signature.X509Certificate xmlCert)
throws CertificateException {
if (xmlCert == null || xmlCert.getValue() == null) {
return null;
}
Collection<X509Certificate> certs = X509Util.decodeCertificate(Base64.decode(xmlCert.getValue()));
if (certs != null && certs.iterator().hasNext()) {
return certs.iterator().next();
} else {
return null;
}
}
代码示例来源:origin: io.apigee.opensaml/xmltooling
/**
* Get a list of the Java {@link java.security.cert.X509Certificate} within the given {@link X509Data}.
*
* @param x509Data {@link X509Data} from which to extract the certificate
*
* @return a list of Java {@link java.security.cert.X509Certificate}s
*
* @throws CertificateException thrown if there is a problem converting the
* X509 data into {@link java.security.cert.X509Certificate}s.
*/
public static List<X509Certificate> getCertificates(X509Data x509Data) throws CertificateException {
List<X509Certificate> certList = new LinkedList<X509Certificate>();
if (x509Data == null) {
return certList;
}
for (org.opensaml.xml.signature.X509Certificate xmlCert : x509Data.getX509Certificates()) {
if (xmlCert != null && xmlCert.getValue() != null) {
X509Certificate newCert = getCertificate(xmlCert);
certList.add(newCert);
}
}
return certList;
}
代码示例来源:origin: org.opensaml/xmltooling
/**
* Get a list of the Java {@link java.security.cert.X509Certificate} within the given {@link X509Data}.
*
* @param x509Data {@link X509Data} from which to extract the certificate
*
* @return a list of Java {@link java.security.cert.X509Certificate}s
*
* @throws CertificateException thrown if there is a problem converting the
* X509 data into {@link java.security.cert.X509Certificate}s.
*/
public static List<X509Certificate> getCertificates(X509Data x509Data) throws CertificateException {
List<X509Certificate> certList = new LinkedList<X509Certificate>();
if (x509Data == null) {
return certList;
}
for (org.opensaml.xml.signature.X509Certificate xmlCert : x509Data.getX509Certificates()) {
if (xmlCert != null && xmlCert.getValue() != null) {
X509Certificate newCert = getCertificate(xmlCert);
certList.add(newCert);
}
}
return certList;
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.identity.relyingparty
certValue = certElem.getValue();
certInBytes = Base64.decode(certValue);
inputStream = new ByteArrayInputStream(certInBytes);
代码示例来源:origin: org.adeptnet.auth/auth-saml
for (X509Certificate xcert : x509data.getX509Certificates()) {
try {
_cert = certFromString(xcert.getValue());
break find_cert_loop;
} catch (CertificateException e) {
代码示例来源:origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.outbound.metadata.saml2
if (descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().get(y) != null) {
if (descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().get(y).
getValue() != null && descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().
get(y).getValue().length() > 0) {
getValue().toString();
代码示例来源:origin: lastpass/saml-sdk-java
for (X509Certificate xcert: x509data.getX509Certificates()) {
try {
cert = certFromString(xcert.getValue());
break find_cert_loop;
} catch (CertificateException e) {
内容来源于网络,如有侵权,请联系作者删除!