On running test the sript generates 3 user where password == username
All checks were successful
continuous-integration/drone/push Build is passing

->  user1: 'alma' with passphrase: 'amla'
    ->  user2: 'citrom' with passphrase: 'mortic'
    ->  user1: 'dinnye' with passphrase: 'eynnid'

The private keys are envrypted in DER format with pkcs#8 using the passphrase.
The private keys are temporarly stored under config/{homeDir}
The public keys are stored in the config file without encryption
This commit is contained in:
2021-04-18 18:59:01 +02:00
parent 2f011de6f7
commit 81211b1dd5
2 changed files with 61 additions and 11 deletions

View File

@@ -62,7 +62,18 @@ def testUserExists(username: str, password: str):
logging.info('TEST 2 --> User exists with INVALID user :: PASSED')
def productionInit():
auth = Authetication()
auth.initConfig()
auth.saveUser('alma','alma')
auth.generatePrivateKeyForUser('alma', 'amla')
auth.saveUser('citrom','citrom')
auth.generatePrivateKeyForUser('citrom', 'mortic')
auth.saveUser('dinnye','dinnye')
auth.generatePrivateKeyForUser('dinnye', 'eynnid')
if __name__ == '__main__':
testSaveUser("Diósbejglia", "Diósbejgli")
testAuth("Diósbejglia", "Diósbejgli")
testUserExists("Diósbejglia", "Diósbejgli")
productionInit()