Some refactoring. Fix to DSA certificate generation. Added
KeyStoreCreator tests.