(file) Return to SSLContext.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/SSLContext.cpp between version 1.23 and 1.24

version 1.23, 2003/10/22 14:26:04 version 1.24, 2003/11/11 19:34:24
Line 531 
Line 531 
             //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);
         }         }
  
         //         //
Line 552 
Line 552 
                 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
Line 565 
Line 565 
             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 )
Line 574 
Line 574 
             // 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();
Line 591 
Line 596 
                 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);
             }             }
         }         }
     }     }
Line 607 
Line 612 
         //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();
Line 630 
Line 635 
         //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
Line 639 
Line 644 
         //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
  
Line 680 
Line 685 
             //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);
         }         }
     }     }
  
Line 706 
Line 711 
             //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);
         }         }
  
         //         //
Line 729 
Line 734 
                 //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;
         }         }
Line 754 
Line 759 
             //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;
     }     }


Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2