version 1.23, 2003/10/22 14:26:04
|
version 1.24, 2003/11/11 19:34:24
|
|
|
//throw( SSLException("Random seed file required")); | //throw( SSLException("Random seed file required")); |
MessageLoaderParms parms("Common.SSLContext.RANDOM_SEED_FILE_REQUIRED", | MessageLoaderParms parms("Common.SSLContext.RANDOM_SEED_FILE_REQUIRED", |
"Random seed file required"); | "Random seed file required"); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
| |
// | // |
|
|
MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE", | MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE", |
"Not enough seed data in random seed file.", | "Not enough seed data in random seed file.", |
randomFile); | randomFile); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
} | } |
else | else |
|
|
MessageLoaderParms parms("Common.SSLContext.SEED_FILE_DOES_NOT_EXIST", | MessageLoaderParms parms("Common.SSLContext.SEED_FILE_DOES_NOT_EXIST", |
"Seed file '$0' does not exist.", | "Seed file '$0' does not exist.", |
randomFile); | randomFile); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
| |
if ( RAND_status() == 0 ) | if ( RAND_status() == 0 ) |
|
|
// Try to do more seeding | // Try to do more seeding |
// | // |
long seedNumber; | long seedNumber; |
|
#if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC) |
|
srand((unsigned int)time(NULL)); // Initialize |
|
seedNumber = rand(); |
|
#else |
srandom((unsigned int)time(NULL)); // Initialize | srandom((unsigned int)time(NULL)); // Initialize |
seedNumber = random(); | seedNumber = random(); |
|
#endif |
RAND_seed((unsigned char *) &seedNumber, sizeof(seedNumber)); | RAND_seed((unsigned char *) &seedNumber, sizeof(seedNumber)); |
| |
int seedRet = RAND_status(); | int seedRet = RAND_status(); |
|
|
MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE", | MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA_IN_FILE", |
"Not enough seed data in random seed file.", | "Not enough seed data in random seed file.", |
randomFile); | randomFile); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
} | } |
} | } |
|
|
//throw( SSLException("Not enough seed data.")); | //throw( SSLException("Not enough seed data.")); |
MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA", | MessageLoaderParms parms("Common.SSLContext.NOT_ENOUGH_SEED_DATA", |
"Not enough seed data."); | "Not enough seed data."); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
|
|
//throw( SSLException("Could not get SSL CTX")); | //throw( SSLException("Could not get SSL CTX")); |
MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET", | MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET", |
"Could not get SSL CTX"); | "Could not get SSL CTX"); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
| |
#ifdef PEGASUS_SSL_WEAKENCRYPTION | #ifdef PEGASUS_SSL_WEAKENCRYPTION |
|
|
//throw( SSLException("Could not set the cipher list")); | //throw( SSLException("Could not set the cipher list")); |
MessageLoaderParms parms("Common.SSLContext.COULD_NOT_SET_CIPHER_LIST", | MessageLoaderParms parms("Common.SSLContext.COULD_NOT_SET_CIPHER_LIST", |
"Could not set the cipher list"); | "Could not set the cipher list"); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
#endif | #endif |
| |
|
|
//throw( SSLException("Could not load certificates in to trust store.")); | //throw( SSLException("Could not load certificates in to trust store.")); |
MessageLoaderParms parms("Common.SSLContext.COULD_NOT_LOAD_CERTIFICATES", | MessageLoaderParms parms("Common.SSLContext.COULD_NOT_LOAD_CERTIFICATES", |
"Could not load certificates in to trust store."); | "Could not load certificates in to trust store."); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
} | } |
| |
|
|
//throw( SSLException("Could not get server certificate.")); | //throw( SSLException("Could not get server certificate.")); |
MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_SERVER_CERTIFICATE", | MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_SERVER_CERTIFICATE", |
"Could not get server certificate."); | "Could not get server certificate."); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
| |
// | // |
|
|
//throw( SSLException("Could not get private key.")); | //throw( SSLException("Could not get private key.")); |
MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY", | MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY", |
"Could not get private key."); | "Could not get private key."); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
keyLoaded = true; | keyLoaded = true; |
} | } |
|
|
//throw( SSLException("Could not get private key.")); | //throw( SSLException("Could not get private key.")); |
MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY", | MessageLoaderParms parms("Common.SSLContext.COULD_NOT_GET_PRIVATE_KEY", |
"Could not get private key."); | "Could not get private key."); |
throw( SSLException(parms)); |
throw SSLException(parms); |
} | } |
keyLoaded = true; | keyLoaded = true; |
} | } |