fixed RSA key checks

This commit is contained in:
Eugene Pankov 2022-07-31 23:38:51 +02:00
parent f01a4363bb
commit 1e3f3ff3de
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4

View file

@ -2,7 +2,7 @@ use std::collections::HashSet;
use std::sync::Arc;
use async_trait::async_trait;
use data_encoding::BASE64_MIME;
use data_encoding::BASE64;
use sea_orm::ActiveValue::Set;
use sea_orm::{ActiveModelTrait, DatabaseConnection, EntityTrait};
use tokio::sync::Mutex;
@ -102,9 +102,7 @@ impl ConfigProvider for FileConfigProvider {
kind,
public_key_bytes,
} => {
let mut base64_bytes = BASE64_MIME.encode(public_key_bytes);
base64_bytes.pop();
base64_bytes.pop();
let mut base64_bytes = BASE64.encode(public_key_bytes);
let client_key = format!("{} {}", kind, base64_bytes);
debug!(username = &user.username[..], "Client key: {}", client_key);