hash to fingerprint

This commit is contained in:
Drew Ansbacher
2021-09-20 12:13:16 -06:00
committed by Matt Hill
parent 66ff38688e
commit 27ea0bb29c
4 changed files with 7 additions and 7 deletions

View File

@@ -51,7 +51,7 @@
<ion-label>
<h1>{{ ssh.hostname }}</h1>
<h2>{{ ssh['created-at'] | date: 'short' }}</h2>
<p>{{ ssh.alg }} {{ ssh.hash }}</p>
<p>{{ ssh.alg }} {{ ssh.fingerprint }}</p>
</ion-label>
<ion-button slot="end" fill="clear" color="danger" (click)="presentAlertDelete(i)">
<ion-icon slot="start" name="close"></ion-icon>

View File

@@ -102,7 +102,7 @@ export class SSHKeysPage {
try {
const entry = this.sshKeys[i]
await this.embassyApi.deleteSshKey({ hash: entry.hash })
await this.embassyApi.deleteSshKey({ fingerprint: entry.fingerprint })
delete this.sshKeys[i]
} catch (e) {
this.errToast.present(e)

View File

@@ -837,13 +837,13 @@ export module Mock {
'created-at': new Date().toISOString(),
alg: 'ed25519',
hostname: 'Matt Key',
hash: '28:d2:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53',
fingerprint: '28:d2:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53',
},
{
'created-at': new Date().toISOString(),
alg: 'ed25519',
hostname: 'Aiden Key',
hash: '12:f8:7e:78:61:b4:bf:e2:de:24:15:96:4e:d4:72:53',
fingerprint: '12:f8:7e:78:61:b4:bf:e2:de:24:15:96:4e:d4:72:53',
},
]
@@ -851,7 +851,7 @@ export module Mock {
'created-at': new Date().toISOString(),
alg: 'ed25519',
hostname: 'Lucy Key',
hash: '44:44:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53',
fingerprint: '44:44:7e:78:61:b4:bf:g2:de:24:15:96:4e:d4:15:53',
}
export const Wifi: RR.GetWifiRes = {

View File

@@ -113,7 +113,7 @@ export module RR {
export type AddSSHKeyReq = { key: string } // ssh.add
export type AddSSHKeyRes = SSHKey
export type DeleteSSHKeyReq = { hash: string } // ssh.delete
export type DeleteSSHKeyReq = { fingerprint: string } // ssh.delete
export type DeleteSSHKeyRes = null
// backup
@@ -316,7 +316,7 @@ export interface SSHKey {
'created-at': string
alg: string
hostname: string
hash: string
fingerprint: string
}
export type ServerNotifications = ServerNotification<any>[]