Java 类javax.xml.crypto.dsig.XMLValidateContext 实例源码

项目:xmlsec-gost    文件:TestUtils.java   
public static XMLValidateContext getXMLValidateContext(String type,
                                                   File input,
                                                   String tag)
    throws Exception {
    if (type.equalsIgnoreCase("dom")) {
        DocumentBuilder docBuilder = XMLUtils.createDocumentBuilder(false, false);
        Document doc = docBuilder.parse(input);
        if (tag == null) {
            return new DOMValidateContext
                (TestUtils.getPublicKey("RSA", 512),
                 doc.getDocumentElement());
        } else {
            NodeList list = doc.getElementsByTagName(tag);
            return new DOMValidateContext
                (TestUtils.getPublicKey("RSA", 512), list.item(0));
        }
    } else {
        throw new Exception("Unsupported XMLValidateContext type: " + type);
    }
}
项目:xmlsec-gost    文件:TestUtils.java   
public boolean validate(XMLValidateContext vCtx)
    throws XMLSignatureException {
    this.dis = new ByteArrayInputStream(id.getBytes());
    this.derefData = new OctetStreamData(this.dis);
    return status;
}
项目:oiosaml.java    文件:DOMXMLSignatureFactory.java   
public XMLSignature unmarshalXMLSignature(XMLValidateContext context) throws MarshalException {
    throw new UnsupportedOperationException();
}
项目:OpenJSharp    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:jdk8u-jdk    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:openjdk-jdk10    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:openjdk9    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:xmlsec-gost    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, DOMSignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:jdk8u_jdk    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:lookaside_java-1.8.0-openjdk    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:infobip-open-jdk-8    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:jdk8u-dev-jdk    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;
项目:OLD-OpenJDK8    文件:AbstractDOMSignatureMethod.java   
/**
 * Verifies the passed-in signature with the specified key, using the
 * underlying Signature or Mac algorithm.
 *
 * @param key the verification key
 * @param si the SignedInfo
 * @param sig the signature bytes to be verified
 * @param context the XMLValidateContext
 * @return <code>true</code> if the signature verified successfully,
 *    <code>false</code> if not
 * @throws NullPointerException if <code>key</code>, <code>si</code> or
 *    <code>sig</code> are <code>null</code>
 * @throws InvalidKeyException if the key is improperly encoded, of
 *    the wrong type, or parameters are missing, etc
 * @throws SignatureException if an unexpected error occurs, such
 *    as the passed in signature is improperly encoded
 * @throws XMLSignatureException if an unexpected error occurs
 */
abstract boolean verify(Key key, SignedInfo si, byte[] sig,
                        XMLValidateContext context)
    throws InvalidKeyException, SignatureException, XMLSignatureException;