#define BOOST_TEST_MODULE KEY_MANAGER_TEST
#include <boost/test/unit_test.hpp>
+#include <exception.h>
#include <key-provider.h>
#include <test_common.h>
#include <iostream>
BOOST_REQUIRE_NO_THROW(rb_test =
CKM::KeyProvider::generateDomainKEK(USERNAME_LONG, PASSWORD));
BOOST_REQUIRE_THROW(keyProvider = CKM::KeyProvider(rb_test, INCORRECT_PASSWORD),
- CKM::KeyProvider::Exception::PassWordError);
+ CKM::Exc::AuthenticationFailed);
BOOST_REQUIRE_MESSAGE(!keyProvider.isInitialized(),
"KeyProvider not created, but initialized");
}
BOOST_REQUIRE_NO_THROW(rb_test =
CKM::KeyProvider::generateDomainKEK(USERNAME_LONG, PASSWORD));
BOOST_REQUIRE_THROW((rb_test = CKM::KeyProvider::reencrypt(rb_test, INCORRECT_PASSWORD,
- NEW_PASSWORD)), CKM::KeyProvider::Exception::PassWordError);
+ NEW_PASSWORD)), CKM::Exc::AuthenticationFailed);
}
BOOST_AUTO_TEST_CASE(KeyGetPureDEK_after_reencrypt){