Authentication_test corrections
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c69241249e
commit
3dbde8fbb8
@ -68,10 +68,13 @@ def testPersistency():
|
||||
logging.info('PERSISTENCY TEST')
|
||||
auth = Authetication()
|
||||
auth.initConfig()
|
||||
serverPublicKey = init.generatePrivateKeyForServer(auth, 'admin')
|
||||
auth.saveUser('alma','alma')
|
||||
init.generatePrivateKeyForUser(auth, 'alma', 'amla')
|
||||
homeDir = auth.login('alma','alma')
|
||||
init.generatePrivateKeyForUser(auth, 'alma', 'amla', serverPublicKey, init.generateSourceAddress(homeDir))
|
||||
auth.saveUser('citrom','citrom')
|
||||
init.generatePrivateKeyForUser(auth, 'citrom', 'mortic')
|
||||
homeDir = auth.login('citrom','citrom')
|
||||
init.generatePrivateKeyForUser(auth, 'citrom', 'mortic', serverPublicKey, init.generateSourceAddress(homeDir))
|
||||
|
||||
auth2 = Authetication()
|
||||
if auth2.checkUserExists('alma'):
|
||||
|
@ -5,7 +5,6 @@ from Crypto.PublicKey import RSA
|
||||
|
||||
from authentication import Authetication
|
||||
|
||||
|
||||
def generatePrivateKeyForUser(auth: Authetication,username: str, user_passphrase: str, public_server_key: str,address: str) -> bool:
|
||||
if auth.checkUserExists(username):
|
||||
with open(auth.CONFIG_FILE_LOCATION) as json_file:
|
||||
|
Loading…
Reference in New Issue
Block a user