mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add a new CLI option to the sysadm server:
"-import_ssl_key <user> <key> <nickname> [<email>]": This will add the designated key (file path or raw text) to the SSL keys available for authentication to the server.
This commit is contained in:
@@ -86,6 +86,13 @@ bool AuthorizationManager::RegisterCertificate(QString token, QString pubkey, QS
|
||||
CONFIG->setValue("RegisteredCerts/"+user+"/"+pubkey, "Nickname: "+nickname+"\nEmail: "+email+"\nDate Registered: "+QDateTime::currentDateTime().toString(Qt::ISODate) );
|
||||
return true;
|
||||
}
|
||||
//
|
||||
bool AuthorizationManager::RegisterCertificateInternal(QString user, QByteArray pubkey, QString nickname, QString email){
|
||||
pubkey = pubkey.toBase64();
|
||||
//NOTE: The public key should be saved as a base64 encoded string
|
||||
CONFIG->setValue("RegisteredCerts/"+user+"/"+pubkey, "Nickname: "+nickname+"\nEmail: "+email+"\nDate Registered: "+QDateTime::currentDateTime().toString(Qt::ISODate) );
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AuthorizationManager::RevokeCertificate(QString token, QString key, QString user){
|
||||
//user will be the current user if not empty - cannot touch other user's certs without full perms on current session
|
||||
|
||||
Reference in New Issue
Block a user