| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* Asymmetric public-key cryptography key subtype |
|---|
| 2 | 3 | * |
|---|
| 3 | | - * See Documentation/crypto/asymmetric-keys.txt |
|---|
| 4 | + * See Documentation/crypto/asymmetric-keys.rst |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. |
|---|
| 6 | 7 | * Written by David Howells (dhowells@redhat.com) |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or |
|---|
| 9 | | - * modify it under the terms of the GNU General Public Licence |
|---|
| 10 | | - * as published by the Free Software Foundation; either version |
|---|
| 11 | | - * 2 of the Licence, or (at your option) any later version. |
|---|
| 12 | 8 | */ |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | #ifndef _KEYS_ASYMMETRIC_SUBTYPE_H |
|---|
| .. | .. |
|---|
| 17 | 13 | #include <linux/seq_file.h> |
|---|
| 18 | 14 | #include <keys/asymmetric-type.h> |
|---|
| 19 | 15 | |
|---|
| 16 | +struct kernel_pkey_query; |
|---|
| 17 | +struct kernel_pkey_params; |
|---|
| 20 | 18 | struct public_key_signature; |
|---|
| 21 | 19 | |
|---|
| 22 | 20 | /* |
|---|
| .. | .. |
|---|
| 34 | 32 | /* Destroy a key of this subtype */ |
|---|
| 35 | 33 | void (*destroy)(void *payload_crypto, void *payload_auth); |
|---|
| 36 | 34 | |
|---|
| 35 | + int (*query)(const struct kernel_pkey_params *params, |
|---|
| 36 | + struct kernel_pkey_query *info); |
|---|
| 37 | + |
|---|
| 38 | + /* Encrypt/decrypt/sign data */ |
|---|
| 39 | + int (*eds_op)(struct kernel_pkey_params *params, |
|---|
| 40 | + const void *in, void *out); |
|---|
| 41 | + |
|---|
| 37 | 42 | /* Verify the signature on a key of this subtype (optional) */ |
|---|
| 38 | 43 | int (*verify_signature)(const struct key *key, |
|---|
| 39 | 44 | const struct public_key_signature *sig); |
|---|