1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <openssl/evp.h>
5 
6 #include "user-record.h"
7 
8 int user_record_sign(UserRecord *ur, EVP_PKEY *private_key, UserRecord **ret);
9 
10 enum {
11         USER_RECORD_UNSIGNED,           /* user record has no signature */
12         USER_RECORD_SIGNED_EXCLUSIVE,   /* user record has only a signature by our own key */
13         USER_RECORD_SIGNED,             /* user record is signed by us, but by others too */
14         USER_RECORD_FOREIGN,            /* user record is not signed by us, but by others */
15 };
16 
17 int user_record_verify(UserRecord *ur, EVP_PKEY *public_key);
18 
19 int user_record_has_signature(UserRecord *ur);
20