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

TOMOYO Linux Cross Reference
Linux/include/linux/digsig.h

Version: ~ [ linux-5.11 ] ~ [ linux-5.10.17 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.99 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.176 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.221 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.257 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.257 ] ~ [ 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 /*
  2  * Copyright (C) 2011 Nokia Corporation
  3  * Copyright (C) 2011 Intel Corporation
  4  *
  5  * Author:
  6  * Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
  7  *                 <dmitry.kasatkin@intel.com>
  8  *
  9  * This program is free software; you can redistribute it and/or modify
 10  * it under the terms of the GNU General Public License as published by
 11  * the Free Software Foundation, version 2 of the License.
 12  *
 13  */
 14 
 15 #ifndef _DIGSIG_H
 16 #define _DIGSIG_H
 17 
 18 #include <linux/key.h>
 19 
 20 enum pubkey_algo {
 21         PUBKEY_ALGO_RSA,
 22         PUBKEY_ALGO_MAX,
 23 };
 24 
 25 enum digest_algo {
 26         DIGEST_ALGO_SHA1,
 27         DIGEST_ALGO_SHA256,
 28         DIGEST_ALGO_MAX
 29 };
 30 
 31 struct pubkey_hdr {
 32         uint8_t         version;        /* key format version */
 33         uint32_t        timestamp;      /* key made, always 0 for now */
 34         uint8_t         algo;
 35         uint8_t         nmpi;
 36         char            mpi[0];
 37 } __packed;
 38 
 39 struct signature_hdr {
 40         uint8_t         version;        /* signature format version */
 41         uint32_t        timestamp;      /* signature made */
 42         uint8_t         algo;
 43         uint8_t         hash;
 44         uint8_t         keyid[8];
 45         uint8_t         nmpi;
 46         char            mpi[0];
 47 } __packed;
 48 
 49 #if defined(CONFIG_SIGNATURE) || defined(CONFIG_SIGNATURE_MODULE)
 50 
 51 int digsig_verify(struct key *keyring, const char *sig, int siglen,
 52                                         const char *digest, int digestlen);
 53 
 54 #else
 55 
 56 static inline int digsig_verify(struct key *keyring, const char *sig,
 57                                 int siglen, const char *digest, int digestlen)
 58 {
 59         return -EOPNOTSUPP;
 60 }
 61 
 62 #endif /* CONFIG_SIGNATURE */
 63 
 64 #endif /* _DIGSIG_H */
 65 

~ [ 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