On running test the sript generates 3 user where password == username
All checks were successful
continuous-integration/drone/push Build is passing
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user