summaryrefstree
path: root/kernel/security/proca/proca_identity.h
blob: b478ac69aa2974d1ed82e3d26fd350d0e8fc72b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * PROCA identity
 *
 * Copyright (C) 2018 Samsung Electronics, Inc.
 * Ivan Vorobiov, <i.vorobiov@samsung.com>
 * Egor Uleyskiy, <e.uleyskiy@samsung.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef _LINUX_PROCA_IDENTITY_H
#define _LINUX_PROCA_IDENTITY_H

#include <linux/file.h>

#include "proca_certificate.h"

struct proca_identity {
	void *certificate;
	size_t certificate_size;
	struct proca_certificate parsed_cert;
	struct file *file;
};

int init_proca_identity(struct proca_identity *identity,
			struct file *file,
			char *xattr_value,
			const size_t xattr_size,
			struct proca_certificate *parsed_cert);

void deinit_proca_identity(struct proca_identity *identity);

int proca_identity_copy(struct proca_identity *dst, struct proca_identity *src);

#endif /* _LINUX_PROCA_IDENTITY_H */