Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
ar-key.c File Reference
#include <linux/module.h>
#include <linux/net.h>
#include <linux/skbuff.h>
#include <linux/key-type.h>
#include <linux/crypto.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <net/sock.h>
#include <net/af_rxrpc.h>
#include <keys/rxrpc-type.h>
#include <keys/user-type.h>
#include "ar-internal.h"

Go to the source code of this file.

Macros

#define RND(X)   (((X) + 3) & ~3)
 
#define ENCODE(x)
 
#define ENCODE_DATA(l, s)
 
#define ENCODE64(x)
 
#define ENCODE_STR(s)
 

Functions

 EXPORT_SYMBOL (key_type_rxrpc)
 
int rxrpc_request_key (struct rxrpc_sock *rx, char __user *optval, int optlen)
 
int rxrpc_server_keyring (struct rxrpc_sock *rx, char __user *optval, int optlen)
 
int rxrpc_get_server_data_key (struct rxrpc_connection *conn, const void *session_key, time_t expiry, u32 kvno)
 
 EXPORT_SYMBOL (rxrpc_get_server_data_key)
 
struct keyrxrpc_get_null_key (const char *keyname)
 
 EXPORT_SYMBOL (rxrpc_get_null_key)
 

Variables

struct key_type key_type_rxrpc
 
struct key_type key_type_rxrpc_s
 

Macro Definition Documentation

#define ENCODE (   x)
Value:
do { \
if (put_user(y, xdr++) < 0) \
goto fault; \
} while(0)
#define ENCODE64 (   x)
Value:
do { \
if (copy_to_user(xdr, &y, 8) != 0) \
goto fault; \
xdr += 8 >> 2; \
} while(0)
#define ENCODE_DATA (   l,
  s 
)
Value:
do { \
u32 _l = (l); \
ENCODE(l); \
if (copy_to_user(xdr, (s), _l) != 0) \
goto fault; \
if (_l & 3 && \
copy_to_user((u8 *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
goto fault; \
xdr += (_l + 3) >> 2; \
} while(0)
#define ENCODE_STR (   s)
Value:
do { \
const char *_s = (s); \
ENCODE_DATA(strlen(_s), _s); \
} while(0)
#define RND (   X)    (((X) + 3) & ~3)

Function Documentation

EXPORT_SYMBOL ( key_type_rxrpc  )
EXPORT_SYMBOL ( rxrpc_get_server_data_key  )
EXPORT_SYMBOL ( rxrpc_get_null_key  )
struct key* rxrpc_get_null_key ( const char keyname)
read

rxrpc_get_null_key - Generate a null RxRPC key : The name to give the key.

Generate a null RxRPC key that can be used to indicate anonymous security is required for a particular domain.

Definition at line 992 of file ar-key.c.

int rxrpc_get_server_data_key ( struct rxrpc_connection conn,
const void session_key,
time_t  expiry,
u32  kvno 
)

Definition at line 935 of file ar-key.c.

int rxrpc_request_key ( struct rxrpc_sock rx,
char __user optval,
int  optlen 
)

Definition at line 862 of file ar-key.c.

int rxrpc_server_keyring ( struct rxrpc_sock rx,
char __user optval,
int  optlen 
)

Definition at line 898 of file ar-key.c.

Variable Documentation

struct key_type key_type_rxrpc
Initial value:
= {
.name = "rxrpc",
.instantiate = rxrpc_instantiate,
.match = user_match,
.destroy = rxrpc_destroy,
.describe = rxrpc_describe,
.read = rxrpc_read,
}

Definition at line 40 of file ar-key.c.

struct key_type key_type_rxrpc_s
Initial value:
= {
.name = "rxrpc_s",
.vet_description = rxrpc_vet_description_s,
.instantiate = rxrpc_instantiate_s,
.match = user_match,
.destroy = rxrpc_destroy_s,
.describe = rxrpc_describe,
}

Definition at line 54 of file ar-key.c.