create key pair if it is not found in database

This commit is contained in:
Night Kaly 2024-09-24 19:14:15 +01:00
parent 294662e2ae
commit 74952aae1c
Signed by: night0721
GPG key ID: 957D67B8DB7A119B

View file

@ -64,6 +64,7 @@ keypair_t *get_keypair(char *username)
FILE *pkf = fopen(pk_path, "r"); FILE *pkf = fopen(pk_path, "r");
FILE *skf = fopen(sk_path, "r"); FILE *skf = fopen(sk_path, "r");
if (!pkf || !skf) { if (!pkf || !skf) {
create_keypair(username);
printf("Error opening key files.\n"); printf("Error opening key files.\n");
return NULL; return NULL;
} }