Я экспериментировал с кодом для XML отдельных подписей из Oracle (https://docs.oracle.com/javase/8/docs/technotes/guides/security/xmldsig/GenDetached.java), и он отлично работает с URI «HTTP», но когда я пытаюсь подписать что-то с помощью « HTTPS "URI он не может разрешить.
Это может быть ошибка ладьи ie, но я не могу найти ответы на эту проблему.
Exception in thread "main" javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Could not find a resolver for URI https://www.w3schools.com/xml/simple.xml and Base null
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:422)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:356)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:490)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:375)
at com.company.GenDetached.main(GenDetached.java:118)
Caused by: javax.xml.crypto.URIReferenceException: com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Could not find a resolver for URI https://www.w3schools.com/xml/simple.xml and Base null
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:133)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:418)
... 4 more
Caused by: com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Could not find a resolver for URI https://www.w3schools.com/xml/simple.xml and Base null
at java.xml.crypto/com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.internalGetInstance(ResourceResolver.java:118)
at java.xml.crypto/com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.getInstance(ResourceResolver.java:77)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:125)
... 5 more
javax.xml.crypto.URIReferenceException: com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Could not find a resolver for URI https://www.w3schools.com/xml/simple.xml and Base null
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:133)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:418)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMReference.digest(DOMReference.java:356)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMXMLSignature.digestReference(DOMXMLSignature.java:490)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMXMLSignature.sign(DOMXMLSignature.java:375)
at com.company.GenDetached.main(GenDetached.java:118)
Caused by: com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Could not find a resolver for URI https://www.w3schools.com/xml/simple.xml and Base null
at java.xml.crypto/com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.internalGetInstance(ResourceResolver.java:118)
at java.xml.crypto/com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolver.getInstance(ResourceResolver.java:77)
at java.xml.crypto/org.jcp.xml.dsig.internal.dom.DOMURIDereferencer.dereference(DOMURIDereferencer.java:125)
... 5 more
Process finished with exit code 1