Blame view

security/integrity/evm/evm.h 1.38 KB
66dbc325a   Mimi Zohar   evm: re-release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  /*
   * Copyright (C) 2005-2010 IBM Corporation
   *
   * Authors:
   * Mimi Zohar <zohar@us.ibm.com>
   * Kylene Hall <kjhall@us.ibm.com>
   *
   * 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, version 2 of the License.
   *
   * File: evm.h
   *
   */
15647eb39   Dmitry Kasatkin   evm: digital sign...
15
16
17
  
  #ifndef __INTEGRITY_EVM_H
  #define __INTEGRITY_EVM_H
cb7231806   Mimi Zohar   evm: add evm_inod...
18
  #include <linux/xattr.h>
66dbc325a   Mimi Zohar   evm: re-release
19
  #include <linux/security.h>
15647eb39   Dmitry Kasatkin   evm: digital sign...
20

66dbc325a   Mimi Zohar   evm: re-release
21
22
23
24
  #include "../integrity.h"
  
  extern int evm_initialized;
  extern char *evm_hmac;
15647eb39   Dmitry Kasatkin   evm: digital sign...
25
  extern char *evm_hash;
66dbc325a   Mimi Zohar   evm: re-release
26

d46eb3699   Dmitry Kasatkin   evm: crypto hash ...
27
  extern struct crypto_shash *hmac_tfm;
15647eb39   Dmitry Kasatkin   evm: digital sign...
28
  extern struct crypto_shash *hash_tfm;
d46eb3699   Dmitry Kasatkin   evm: crypto hash ...
29

66dbc325a   Mimi Zohar   evm: re-release
30
31
32
33
34
35
36
37
38
39
40
  /* List of EVM protected security xattrs */
  extern char *evm_config_xattrnames[];
  
  extern int evm_init_key(void);
  extern int evm_update_evmxattr(struct dentry *dentry,
  			       const char *req_xattr_name,
  			       const char *req_xattr_value,
  			       size_t req_xattr_value_len);
  extern int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name,
  			 const char *req_xattr_value,
  			 size_t req_xattr_value_len, char *digest);
15647eb39   Dmitry Kasatkin   evm: digital sign...
41
42
43
  extern int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name,
  			 const char *req_xattr_value,
  			 size_t req_xattr_value_len, char *digest);
cb7231806   Mimi Zohar   evm: add evm_inod...
44
45
  extern int evm_init_hmac(struct inode *inode, const struct xattr *xattr,
  			 char *hmac_val);
66dbc325a   Mimi Zohar   evm: re-release
46
47
  extern int evm_init_secfs(void);
  extern void evm_cleanup_secfs(void);
15647eb39   Dmitry Kasatkin   evm: digital sign...
48
49
  
  #endif