Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
digsig.c File Reference
#include <linux/err.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/key.h>
#include <linux/crypto.h>
#include <crypto/hash.h>
#include <crypto/sha.h>
#include <keys/user-type.h>
#include <linux/mpi.h>
#include <linux/digsig.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 

Functions

int digsig_verify (struct key *keyring, const char *sig, int siglen, const char *data, int datalen)
 
 EXPORT_SYMBOL_GPL (digsig_verify)
 
 module_init (digsig_init)
 
 module_exit (digsig_cleanup)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 18 of file digsig.c.

Function Documentation

int digsig_verify ( struct key keyring,
const char sig,
int  siglen,
const char data,
int  datalen 
)

digsig_verify() - digital signature verification with public key : keyring to search key in : digital signature : length of the signature : data : length of the data

Returns
: 0 on success, -EINVAL otherwise

Verifies data integrity against digital signature. Currently only RSA is supported. Normally hash of the content is used as a data for this function.

Definition at line 199 of file digsig.c.

EXPORT_SYMBOL_GPL ( digsig_verify  )
module_exit ( digsig_cleanup  )
module_init ( digsig_init  )
MODULE_LICENSE ( "GPL"  )