Examples of CryptoLoader


Examples of org.apache.cxf.rs.security.common.CryptoLoader

            throwFault("XML Signature is not available", null);
        }
       
        Crypto crypto = null;
        try {
            CryptoLoader loader = new CryptoLoader();
            crypto = loader.getCrypto(message,
                               SecurityConstants.SIGNATURE_CRYPTO,
                               SecurityConstants.SIGNATURE_PROPERTIES);
            if (crypto == null) {
                crypto = loader.getCrypto(message,
                                   SecurityConstants.ENCRYPT_CRYPTO,
                                   SecurityConstants.ENCRYPT_PROPERTIES);
            }
        } catch (Exception ex) {
            throwFault("Crypto can not be loaded", ex);
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

    private Document createSignature(Message message, Document doc)
        throws Exception {
       
        String userNameKey = SecurityConstants.SIGNATURE_USERNAME;
       
        CryptoLoader loader = new CryptoLoader();
        Crypto crypto = loader.getCrypto(message,
                                         SecurityConstants.SIGNATURE_CRYPTO,
                                         SecurityConstants.SIGNATURE_PROPERTIES);
        if (crypto == null) {
            crypto = loader.getCrypto(message,
                                      SecurityConstants.ENCRYPT_CRYPTO,
                                      SecurityConstants.ENCRYPT_PROPERTIES);
            userNameKey = SecurityConstants.ENCRYPT_USERNAME;
        }
        String user = SecurityUtils.getUserName(message, crypto, userNameKey);
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

   
    // Subclasses can overwrite it and return the bytes, assuming they know the actual key
    protected byte[] getSymmetricKeyBytes(Message message, Element encDataElement) {
        Crypto crypto = null;
        try {
            crypto = new CryptoLoader().getCrypto(message,
                               SecurityConstants.ENCRYPT_CRYPTO,
                               SecurityConstants.ENCRYPT_PROPERTIES);
        } catch (Exception ex) {
            throwFault("Crypto can not be loaded", ex);
        }
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

        byte[] secretKey = getSymmetricKey();

        Document encryptedDataDoc = DOMUtils.createDocument();
        Element encryptedDataElement = createEncryptedDataElement(encryptedDataDoc);
        if (encryptSymmetricKey) {
            CryptoLoader loader = new CryptoLoader();
            Crypto crypto = loader.getCrypto(message,
                                      SecurityConstants.ENCRYPT_CRYPTO,
                                      SecurityConstants.ENCRYPT_PROPERTIES);
           
            String user =
                SecurityUtils.getUserName(message, crypto, SecurityConstants.ENCRYPT_USERNAME);
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

                        subjectName, subjectQualifier, confirmationMethod
                    );
                if (SAML2Constants.CONF_HOLDER_KEY.equals(confirmationMethod)) {
                   
                    try {
                        CryptoLoader loader = new CryptoLoader();
                        Crypto crypto = loader.getCrypto(m,
                                                         SecurityConstants.SIGNATURE_CRYPTO,
                                                         SecurityConstants.SIGNATURE_PROPERTIES);
                        X509Certificate cert =
                            SecurityUtils.getCertificates(crypto,
                                SecurityUtils.getUserName(m, crypto, "ws-security.signature.username"))[0];
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

            throwFault("XML Signature is not available", null);
        }
       
        Crypto crypto = null;
        try {
            CryptoLoader loader = new CryptoLoader();
            crypto = loader.getCrypto(message,
                               SecurityConstants.SIGNATURE_CRYPTO,
                               SecurityConstants.SIGNATURE_PROPERTIES);
            if (crypto == null) {
                crypto = loader.getCrypto(message,
                                   SecurityConstants.ENCRYPT_CRYPTO,
                                   SecurityConstants.ENCRYPT_PROPERTIES);
            }
        } catch (Exception ex) {
            throwFault("Crypto can not be loaded", ex);
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

    private Document createSignature(Message message, Document doc)
        throws Exception {
       
        String userNameKey = SecurityConstants.SIGNATURE_USERNAME;
       
        CryptoLoader loader = new CryptoLoader();
        Crypto crypto = loader.getCrypto(message,
                                         SecurityConstants.SIGNATURE_CRYPTO,
                                         SecurityConstants.SIGNATURE_PROPERTIES);
        if (crypto == null) {
            crypto = loader.getCrypto(message,
                                      SecurityConstants.ENCRYPT_CRYPTO,
                                      SecurityConstants.ENCRYPT_PROPERTIES);
            userNameKey = SecurityConstants.ENCRYPT_USERNAME;
        }
        String user = SecurityUtils.getUserName(message, crypto, userNameKey);
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

   
    // Subclasses can overwrite it and return the bytes, assuming they know the actual key
    protected byte[] getSymmetricKeyBytes(Message message, Element encDataElement) {
        Crypto crypto = null;
        try {
            crypto = new CryptoLoader().getCrypto(message,
                               SecurityConstants.ENCRYPT_CRYPTO,
                               SecurityConstants.ENCRYPT_PROPERTIES);
        } catch (Exception ex) {
            throwFault("Crypto can not be loaded", ex);
        }
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

        byte[] secretKey = getSymmetricKey();

        Document encryptedDataDoc = DOMUtils.createDocument();
        Element encryptedDataElement = createEncryptedDataElement(encryptedDataDoc);
        if (encryptSymmetricKey) {
            CryptoLoader loader = new CryptoLoader();
            Crypto crypto = loader.getCrypto(message,
                                      SecurityConstants.ENCRYPT_CRYPTO,
                                      SecurityConstants.ENCRYPT_PROPERTIES);
           
            String user =
                SecurityUtils.getUserName(message, crypto, SecurityConstants.ENCRYPT_USERNAME);
View Full Code Here

Examples of org.apache.cxf.rs.security.common.CryptoLoader

            propKey = SecurityConstants.ENCRYPT_PROPERTIES;
        }
       
        Crypto crypto = null;
        try {
            crypto = new CryptoLoader().getCrypto(message, cryptoKey, propKey);
        } catch (Exception ex) {
            throwFault("Crypto can not be loaded", ex);
        }
       
        Element encKeyElement = getNode(encDataElement, WSConstants.ENC_NS, "EncryptedKey", 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.