-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.h
43 lines (38 loc) · 1.16 KB
/
interface.h
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
43
/*
* dsngctl - Control utility for DigSig-ng (digsig-ng.org)
*
* interface.h - functions for interfacing with the kernel module
*
* Copyright (c) 2013-2014, The DigSig-ng Authors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef DSNG_INTERFACE_H
#define DSNG_INTERFACE_H
/**
* Reads a public key from the provided path and loads it into the kernel
* module.
*
* @param pkey_path Path to public key.
*
* @returns 0 upon success, or negative integer representing error code.
*/
int dsng_start(char *pkey_path);
/**
* Determines whether the kernel module has been loaded by attempting to stat
* a module sysfs file.
*
* @returns 1 if the module has been loaded, 0 otherwise.
*/
int digsig_is_loaded();
/**
* Determines whether the kernel module is initialized by reading the module
* status from /sys/digsig/status.
*
* @returns 1 if the module has been initialized, 0 otherwise.
*/
int digsig_is_initialized();
#endif /* DSNG_INTERFACE_H */