Examples of BadSecurityConfigurationException


Examples of lv.odylab.evemanage.application.exception.BadSecurityConfigurationException

    private void checkInitializedSecuritySystem(String systemPublicKeyBase64) {
        logger.info("Checking security system configuration (ensuring that system is using correct key pair)");
        String currentPublicKeyBase64 = Base64.encodeBytes(publicKey.getEncoded());
        if (!systemPublicKeyBase64.equals(currentPublicKeyBase64)) {
            throw new BadSecurityConfigurationException("System property public key differs from currently used, halting");
        }
        try {
            decrypt(encrypt("testString".getBytes()));
        } catch (EveManageSecurityException e) {
            throw new BadSecurityConfigurationException("Unable to encrypt and decrypt test string, halting");
        }
        logger.info("Security system is configured correctly");
        checkIfUsingDefaultKeys(systemPublicKeyBase64);
    }
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.