mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add a API call to the server:
rpc/settings: "action" = "list_ssl_checksums"
This will list the MD5 checksums of all the known SSL keys (in no particular order)
REST Request:
-------------------------------
PUT /rpc/settings
{
"action" : "list_ssl_checksums"
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "list_ssl_checksums"
},
"namespace" : "rpc",
"name" : "settings",
"id" : "fooid"
}
Response:
-------------------------------
{
"args": {
"md5_keys": [
"0`H\u0013\r*\u00023\u000bc"
]
},
"id": "fooid",
"name": "response",
"namespace": "rpc"
}
This commit is contained in:
@@ -164,6 +164,9 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmSettingsRequest(const QJsonV
|
||||
}else if(act=="list_ssl_certs"){
|
||||
AUTHSYSTEM->ListCertificates(SockAuthToken, out);
|
||||
ok = true; //always works for current user (even if nothing found)
|
||||
}else if(act=="list_ssl_checksums"){
|
||||
AUTHSYSTEM->ListCertificateChecksums(out);
|
||||
ok = true;
|
||||
}else if(act=="revoke_ssl_cert" && keys.contains("pub_key") ){
|
||||
//Additional arguments: "user" (optional), "pub_key" (String)
|
||||
QString user; if(keys.contains("user")){ user = argsO.value("user").toString(); }
|
||||
|
||||
Reference in New Issue
Block a user