linux/include/keys/rxrpc-type.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/* RxRPC key type
 *
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells ([email protected])
 */

#ifndef _KEYS_RXRPC_TYPE_H
#define _KEYS_RXRPC_TYPE_H

#include <linux/key.h>

/*
 * key type for AF_RXRPC keys
 */
extern struct key_type key_type_rxrpc;

extern struct key *rxrpc_get_null_key(const char *);

/*
 * RxRPC key for Kerberos IV (type-2 security)
 */
struct rxkad_key {};

/*
 * list of tokens attached to an rxrpc key
 */
struct rxrpc_key_token {};

/*
 * structure of raw payloads passed to add_key() or instantiate key
 */
struct rxrpc_key_data_v1 {};

/*
 * AF_RXRPC key payload derived from XDR format
 * - based on openafs-1.4.10/src/auth/afs_token.xg
 */
#define AFSTOKEN_LENGTH_MAX
#define AFSTOKEN_STRING_MAX
#define AFSTOKEN_DATA_MAX
#define AFSTOKEN_CELL_MAX
#define AFSTOKEN_MAX
#define AFSTOKEN_BDATALN_MAX
#define AFSTOKEN_RK_TIX_MAX
#define AFSTOKEN_GK_KEY_MAX
#define AFSTOKEN_GK_TOKEN_MAX

/*
 * Truncate a time64_t to the range from 1970 to 2106 as in the network
 * protocol.
 */
static inline u32 rxrpc_time64_to_u32(time64_t time)
{}

/*
 * Extend u32 back to time64_t using the same 1970-2106 range.
 */
static inline time64_t rxrpc_u32_to_time64(u32 time)
{}

#endif /* _KEYS_RXRPC_TYPE_H */