private static void prepareConfig ( ) { Config config = getInstance ( Config . class ) ; int bitLength = getBitLength ( config . getApplicationSecret ( ) ) ; if ( bitLength < KEY_MIN_BIT_LENGTH ) { LOG . error ( "Application requires a 512 bit application secret. The current property for application.secret has currently only {} bit." , bitLength ) ; failsafe ( ) ; } bitLength = getBitLength ( config . getAuthenticationCookieEncryptionKey ( ) ) ; if ( bitLength < KEY_MIN_BIT_LENGTH ) { LOG . error ( "Authentication cookie requires a 512 bit encryption key. The current property for authentication.cookie.encryptionkey has only {} bit." , bitLength ) ; failsafe ( ) ; } bitLength = getBitLength ( config . getAuthenticationCookieSignKey ( ) ) ; if ( bitLength < KEY_MIN_BIT_LENGTH ) { LOG . error ( "Authentication cookie requires a 512 bit sign key. The current property for authentication.cookie.signkey has only {} bit." , bitLength ) ; failsafe ( ) ; } bitLength = getBitLength ( config . getSessionCookieEncryptionKey ( ) ) ; if ( bitLength < KEY_MIN_BIT_LENGTH ) { LOG . error ( "Session cookie requires a 512 bit encryption key. The current property for session.cookie.encryptionkey has only {} bit." , bitLength ) ; failsafe ( ) ; } bitLength = getBitLength ( config . getSessionCookieSignKey ( ) ) ; if ( bitLength < KEY_MIN_BIT_LENGTH ) { LOG . error ( "Session cookie requires a 512 bit sign key. The current property for session.cookie.signkey has only {} bit." , bitLength ) ; failsafe ( ) ; } bitLength = getBitLength ( config . getFlashCookieSignKey ( ) ) ; if ( bitLength < KEY_MIN_BIT_LENGTH ) { LOG . error ( "Flash cookie requires a 512 bit sign key. The current property for flash.cookie.signkey has only {} bit." , bitLength ) ; failsafe ( ) ; } bitLength = getBitLength ( config . getFlashCookieEncryptionKey ( ) ) ; if ( bitLength < KEY_MIN_BIT_LENGTH ) { LOG . error ( "Flash cookie requires a 512 bit encryption key. The current property for flash.cookie.encryptionkey has only {} bit." , bitLength ) ; failsafe ( ) ; } if ( ! config . isDecrypted ( ) ) { LOG . error ( "Found encrypted config values in config.props but decryption was not successful!" ) ; failsafe ( ) ; } }
Checks for config failures that prevent the application from starting