trusted-type.h 770 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (C) 2010 IBM Corporation
  3. * Author: David Safford <safford@us.ibm.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, version 2 of the License.
  8. */
  9. #ifndef _KEYS_TRUSTED_TYPE_H
  10. #define _KEYS_TRUSTED_TYPE_H
  11. #include <linux/key.h>
  12. #include <linux/rcupdate.h>
  13. #define MIN_KEY_SIZE 32
  14. #define MAX_KEY_SIZE 128
  15. #define MAX_BLOB_SIZE 320
  16. struct trusted_key_payload {
  17. struct rcu_head rcu;
  18. unsigned int key_len;
  19. unsigned int blob_len;
  20. unsigned char migratable;
  21. unsigned char key[MAX_KEY_SIZE + 1];
  22. unsigned char blob[MAX_BLOB_SIZE];
  23. };
  24. extern struct key_type key_type_trusted;
  25. #endif /* _KEYS_TRUSTED_TYPE_H */