Author: mcalmer Date: Tue Nov 6 15:16:11 2007 New Revision: 2361 URL: http://svn.opensuse.org/viewcvs/limal?rev=2361&view=rev Log: password test for importCA and adapt testcases Added: limal-head/limal-ca-mgm/testsuite/TestRepos/importCATestEnc.key Modified: limal-head/limal-ca-mgm/testsuite/DeleteCATest.cc limal-head/limal-ca-mgm/testsuite/ImportCATest.cc limal-head/limal-ca-mgm/testsuite/single.out/DeleteCATest.err limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.err limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.out limal-head/limal-ca-mgm/testsuite/single.out/perl-CertificateExceptionTest.out Modified: limal-head/limal-ca-mgm/testsuite/DeleteCATest.cc URL: http://svn.opensuse.org/viewcvs/limal/limal-head/limal-ca-mgm/testsuite/DeleteCATest.cc?rev=2361&r1=2360&r2=2361&view=diff ============================================================================== --- limal-head/limal-ca-mgm/testsuite/DeleteCATest.cc (original) +++ limal-head/limal-ca-mgm/testsuite/DeleteCATest.cc Tue Nov 6 15:16:11 2007 @@ -47,7 +47,7 @@ { // this is a wanted exception cout << "Got expected exception" << endl; - cerr << e << endl; + cerr << e.getFile() << ": " << e.type() << ": " << e.getMessage() << endl; } CA::deleteCA("Test_CA", "system", true, "./TestRepos/"); Modified: limal-head/limal-ca-mgm/testsuite/ImportCATest.cc URL: http://svn.opensuse.org/viewcvs/limal/limal-head/limal-ca-mgm/testsuite/ImportCATest.cc?rev=2361&r1=2360&r2=2361&view=diff ============================================================================== --- limal-head/limal-ca-mgm/testsuite/ImportCATest.cc (original) +++ limal-head/limal-ca-mgm/testsuite/ImportCATest.cc Tue Nov 6 15:16:11 2007 @@ -28,7 +28,7 @@ blocxx::StringArray cat; cat.push_back("FATAL"); - cat.push_back("ERROR"); + //cat.push_back("ERROR"); cat.push_back("INFO"); //cat.push_back("DEBUG"); @@ -43,7 +43,7 @@ try { - CA::importCA("Test_CA3", + CA::importCA("Test_CA3", LocalManagement::readFile("./TestRepos/importCATest.pem"), LocalManagement::readFile("./TestRepos/importCATest.key"), "", "./TestRepos/"); @@ -52,14 +52,28 @@ { // this is a wanted exception cout << "Got expected exception" << endl; - cerr << e << endl; + cerr << e.getFile() << ": " << e.type() << ": " << e.getMessage() << endl; } + try + { + CA::importCA("Test_CA3", + LocalManagement::readFile("./TestRepos/importCATest.pem"), + LocalManagement::readFile("./TestRepos/importCATestEnc.key"), + "wrong passwd", "./TestRepos/"); + } + catch(ValueException& e) + { + // this is a wanted exception + cout << "Got expected exception" << endl; + cerr << e.getFile() << ": " << e.type() << ": " << e.getMessage() << endl; + } + CA::importCA("Test_CA3", LocalManagement::readFile("./TestRepos/importCATest.pem"), LocalManagement::readFile("./TestRepos/importCATest.key"), "tralla", "./TestRepos/"); - + path::PathInfo t("./TestRepos/Test_CA3/"); if(t.exists() && t.isDir()) { Added: limal-head/limal-ca-mgm/testsuite/TestRepos/importCATestEnc.key URL: http://svn.opensuse.org/viewcvs/limal/limal-head/limal-ca-mgm/testsuite/TestRepos/importCATestEnc.key?rev=2361&view=auto ============================================================================== --- limal-head/limal-ca-mgm/testsuite/TestRepos/importCATestEnc.key (added) +++ limal-head/limal-ca-mgm/testsuite/TestRepos/importCATestEnc.key Tue Nov 6 15:16:11 2007 @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,0909350EE640CD15 + +QwMaO9ksQZbBZi65nBIApyI3GRX1xx+JQTc5RI5f7CkkVYwd/6hrCw6T5OCwnQWI +4XCgnt944HOPuV4mH01lSLPHgSxseSVfth29fzNbuldImx2Ddf6pQ3xPMZrre2hz +Rbc0AMvb+d2id36UDUMRIpKECLLlHFMstJQ6IoCXyD03yv03y4nEmKcmKEEqLzpe +54cVy4P+8B0ZR4kLW/dLXyhKOk+G/LeSrLDt6iMt35Y+131zSDp7DoxFa5EQpz08 +dxJPP05vRmzapphg8xgu/hWLZqjp+XmIMJg/S64aOvHgX28w3F2+2dGKnM+HMw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Qb40mUaML+efb/pp2yLK42pexhnM +4Kn1fV74TxzwwGnIIu4A4y6Gc7IllXBsbavvTumTovSLahxUJCAAu8AeWbc0U5X7 +1Z2mdQ7V3duZ6dtABbh/BektAWODpWuL2gYHysDbQZfKtB0prkCKQTOq1j8Idhh8 +8mdhIbA21yxefcw8t7+i0TREFpZoJh9sy6CvwTsNCpc5o7YEW3h86FXoRyvA7QUs +-----END RSA PRIVATE KEY----- Modified: limal-head/limal-ca-mgm/testsuite/single.out/DeleteCATest.err URL: http://svn.opensuse.org/viewcvs/limal/limal-head/limal-ca-mgm/testsuite/single.out/DeleteCATest.err?rev=2361&r1=2360&r2=2361&view=diff ============================================================================== --- limal-head/limal-ca-mgm/testsuite/single.out/DeleteCATest.err (original) +++ limal-head/limal-ca-mgm/testsuite/single.out/DeleteCATest.err Tue Nov 6 15:16:11 2007 @@ -35,7 +35,7 @@ DEBUG ca-mgm - ExtensionBase::setPresent(): false DEBUG ca-mgm - ExtensionBase::setPresent(): false ERROR ca-mgm - Deleting the CA is not allowed. The CA must be expired or no certificate was signed with this CA -CA.cpp: 1497 RuntimeException: Deleting the CA is not allowed. The CA must be expired or never have signed a certificate. +CA.cpp: RuntimeException: Deleting the CA is not allowed. The CA must be expired or never have signed a certificate. DEBUG ca-mgm - Command: /usr/bin/openssl rsa -noout -in ./TestRepos//Test_CA/cacert.key -passin env:PASSWORD DEBUG ca-mgm - Force delete DEBUG limal - removeDirRecursive ./TestRepos/Test_CA Modified: limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.err URL: http://svn.opensuse.org/viewcvs/limal/limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.err?rev=2361&r1=2360&r2=2361&view=diff ============================================================================== --- limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.err (original) +++ limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.err Tue Nov 6 15:16:11 2007 @@ -1,2 +1,3 @@ -ERROR ca-mgm - CA password is empty. -CA.cpp: 1275 ValueException: CA password is empty. +CA.cpp: ValueException: CA password is empty. +INFO ca-mgm - openssl status:1 +OpenSSLUtils.cpp: ValueException: Invalid password. Modified: limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.out URL: http://svn.opensuse.org/viewcvs/limal/limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.out?rev=2361&r1=2360&r2=2361&view=diff ============================================================================== --- limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.out (original) +++ limal-head/limal-ca-mgm/testsuite/single.out/ImportCATest.out Tue Nov 6 15:16:11 2007 @@ -1,5 +1,6 @@ START Got expected exception +Got expected exception ./TestRepos/Test_CA3/ exists ./TestRepos/Test_CA3/cacert.pem exists ./TestRepos/Test_CA3/cacert.key exists Modified: limal-head/limal-ca-mgm/testsuite/single.out/perl-CertificateExceptionTest.out URL: http://svn.opensuse.org/viewcvs/limal/limal-head/limal-ca-mgm/testsuite/single.out/perl-CertificateExceptionTest.out?rev=2361&r1=2360&r2=2361&view=diff ============================================================================== --- limal-head/limal-ca-mgm/testsuite/single.out/perl-CertificateExceptionTest.out (original) +++ limal-head/limal-ca-mgm/testsuite/single.out/perl-CertificateExceptionTest.out Tue Nov 6 15:16:11 2007 @@ -10,7 +10,7 @@ 'subexception' => { 'file' => 'CA.cpp', 'type' => 'ValueException', - 'line' => 1695, + 'line' => 1712, 'message' => 'emailAddress must be defined.', 'code' => -116 }, -- To unsubscribe, e-mail: limal-commit+unsubscribe@opensuse.org For additional commands, e-mail: limal-commit+help@opensuse.org