~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/keys/asymmetric-subtype.h

Version: ~ [ linux-5.8-rc4 ] ~ [ linux-5.7.7 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.50 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.131 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.187 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.229 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.229 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* Asymmetric public-key cryptography key subtype
  2  *
  3  * See Documentation/security/asymmetric-keys.txt
  4  *
  5  * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
  6  * Written by David Howells (dhowells@redhat.com)
  7  *
  8  * This program is free software; you can redistribute it and/or
  9  * modify it under the terms of the GNU General Public Licence
 10  * as published by the Free Software Foundation; either version
 11  * 2 of the Licence, or (at your option) any later version.
 12  */
 13 
 14 #ifndef _KEYS_ASYMMETRIC_SUBTYPE_H
 15 #define _KEYS_ASYMMETRIC_SUBTYPE_H
 16 
 17 #include <linux/seq_file.h>
 18 #include <keys/asymmetric-type.h>
 19 
 20 struct public_key_signature;
 21 
 22 /*
 23  * Keys of this type declare a subtype that indicates the handlers and
 24  * capabilities.
 25  */
 26 struct asymmetric_key_subtype {
 27         struct module           *owner;
 28         const char              *name;
 29         unsigned short          name_len;       /* length of name */
 30 
 31         /* Describe a key of this subtype for /proc/keys */
 32         void (*describe)(const struct key *key, struct seq_file *m);
 33 
 34         /* Destroy a key of this subtype */
 35         void (*destroy)(void *payload);
 36 
 37         /* Verify the signature on a key of this subtype (optional) */
 38         int (*verify_signature)(const struct key *key,
 39                                 const struct public_key_signature *sig);
 40 };
 41 
 42 /**
 43  * asymmetric_key_subtype - Get the subtype from an asymmetric key
 44  * @key: The key of interest.
 45  *
 46  * Retrieves and returns the subtype pointer of the asymmetric key from the
 47  * type-specific data attached to the key.
 48  */
 49 static inline
 50 struct asymmetric_key_subtype *asymmetric_key_subtype(const struct key *key)
 51 {
 52         return key->type_data.p[0];
 53 }
 54 
 55 #endif /* _KEYS_ASYMMETRIC_SUBTYPE_H */
 56 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp