include/keys/asymmetric-type.h

Source file repositories/reference/linux-study-clean/include/keys/asymmetric-type.h

File Facts

System
Linux kernel
Corpus path
include/keys/asymmetric-type.h
Extension
.h
Size
3050 bytes
Lines
95
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct asymmetric_key_id {
	unsigned short	len;
	unsigned char	data[] __counted_by(len);
};

struct asymmetric_key_ids {
	void		*id[3];
};

extern bool asymmetric_key_id_same(const struct asymmetric_key_id *kid1,
				   const struct asymmetric_key_id *kid2);

extern bool asymmetric_key_id_partial(const struct asymmetric_key_id *kid1,
				      const struct asymmetric_key_id *kid2);

extern struct asymmetric_key_id *asymmetric_key_generate_id(const void *val_1,
							    size_t len_1,
							    const void *val_2,
							    size_t len_2);
static inline
const struct asymmetric_key_ids *asymmetric_key_ids(const struct key *key)
{
	return key->payload.data[asym_key_ids];
}

static inline
const struct public_key *asymmetric_key_public_key(const struct key *key)
{
	return key->payload.data[asym_crypto];
}

extern struct key *find_asymmetric_key(struct key *keyring,
				       const struct asymmetric_key_id *id_0,
				       const struct asymmetric_key_id *id_1,
				       const struct asymmetric_key_id *id_2,
				       bool partial);

int x509_load_certificate_list(const u8 cert_list[], const unsigned long list_size,
			       const struct key *keyring);

/*
 * The payload is at the discretion of the subtype.
 */

#endif /* _KEYS_ASYMMETRIC_TYPE_H */

Annotation

Implementation Notes