Java Code Examples for com.sun.org.apache.xml.internal.security.utils.XMLUtils#selectDs11Nodes()
The following examples show how to use
com.sun.org.apache.xml.internal.security.utils.XMLUtils#selectDs11Nodes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: X509DigestResolver.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 2
Source File: X509DigestResolver.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 3
Source File: X509DigestResolver.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 4
Source File: X509DigestResolver.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 5
Source File: X509DigestResolver.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 6
Source File: X509DigestResolver.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 7
Source File: X509DigestResolver.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 8
Source File: X509DigestResolver.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 9
Source File: X509DigestResolver.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 10
Source File: X509DigestResolver.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 11
Source File: X509DigestResolver.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 12
Source File: X509DigestResolver.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 13
Source File: X509DigestResolver.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 14
Source File: X509DigestResolver.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }
Example 15
Source File: X509DigestResolver.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
/** * Resolves from the storage resolver the actual certificate represented by the digest. * * @param element * @param baseURI * @param storage * @return * @throws XMLSecurityException */ private X509Certificate resolveCertificate(Element element, String baseURI, StorageResolver storage) throws XMLSecurityException { XMLX509Digest x509Digests[] = null; Element x509childNodes[] = XMLUtils.selectDs11Nodes(element.getFirstChild(), Constants._TAG_X509DIGEST); if (x509childNodes == null || x509childNodes.length <= 0) { return null; } try { checkStorage(storage); x509Digests = new XMLX509Digest[x509childNodes.length]; for (int i = 0; i < x509childNodes.length; i++) { x509Digests[i] = new XMLX509Digest(x509childNodes[i], baseURI); } Iterator<Certificate> storageIterator = storage.getIterator(); while (storageIterator.hasNext()) { X509Certificate cert = (X509Certificate) storageIterator.next(); for (int i = 0; i < x509Digests.length; i++) { XMLX509Digest keyInfoDigest = x509Digests[i]; byte[] certDigestBytes = XMLX509Digest.getDigestBytesFromCert(cert, keyInfoDigest.getAlgorithm()); if (Arrays.equals(keyInfoDigest.getDigestBytes(), certDigestBytes)) { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE, "Found certificate with: " + cert.getSubjectX500Principal().getName()); } return cert; } } } } catch (XMLSecurityException ex) { throw new KeyResolverException("empty", ex); } return null; }