mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
SUNRPC: Remove unused krb5_decrypt
The last use of krb5_decrypt() was removed in 2023 by
commit 2a9893f796 ("SUNRPC:
Remove net/sunrpc/auth_gss/gss_krb5_seqnum.c")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
9a28ac1762
commit
e5c8584696
|
|
@ -138,60 +138,6 @@ krb5_encrypt(
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* krb5_decrypt - simple decryption of an RPCSEC GSS payload
|
||||
* @tfm: initialized cipher transform
|
||||
* @iv: pointer to an IV
|
||||
* @in: ciphertext to decrypt
|
||||
* @out: OUT: plaintext
|
||||
* @length: length of input and output buffers, in bytes
|
||||
*
|
||||
* @iv may be NULL to force the use of an all-zero IV.
|
||||
* The buffer containing the IV must be as large as the
|
||||
* cipher's ivsize.
|
||||
*
|
||||
* Return values:
|
||||
* %0: @in successfully decrypted into @out
|
||||
* negative errno: @in not decrypted
|
||||
*/
|
||||
u32
|
||||
krb5_decrypt(
|
||||
struct crypto_sync_skcipher *tfm,
|
||||
void * iv,
|
||||
void * in,
|
||||
void * out,
|
||||
int length)
|
||||
{
|
||||
u32 ret = -EINVAL;
|
||||
struct scatterlist sg[1];
|
||||
u8 local_iv[GSS_KRB5_MAX_BLOCKSIZE] = {0};
|
||||
SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm);
|
||||
|
||||
if (length % crypto_sync_skcipher_blocksize(tfm) != 0)
|
||||
goto out;
|
||||
|
||||
if (crypto_sync_skcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) {
|
||||
dprintk("RPC: gss_k5decrypt: tfm iv size too large %d\n",
|
||||
crypto_sync_skcipher_ivsize(tfm));
|
||||
goto out;
|
||||
}
|
||||
if (iv)
|
||||
memcpy(local_iv, iv, crypto_sync_skcipher_ivsize(tfm));
|
||||
|
||||
memcpy(out, in, length);
|
||||
sg_init_one(sg, out, length);
|
||||
|
||||
skcipher_request_set_sync_tfm(req, tfm);
|
||||
skcipher_request_set_callback(req, 0, NULL, NULL);
|
||||
skcipher_request_set_crypt(req, sg, sg, length, local_iv);
|
||||
|
||||
ret = crypto_skcipher_decrypt(req);
|
||||
skcipher_request_zero(req);
|
||||
out:
|
||||
dprintk("RPC: gss_k5decrypt returns %d\n",ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
checksummer(struct scatterlist *sg, void *data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -166,9 +166,6 @@ u32 gss_krb5_checksum(struct crypto_ahash *tfm, char *header, int hdrlen,
|
|||
u32 krb5_encrypt(struct crypto_sync_skcipher *key, void *iv, void *in,
|
||||
void *out, int length);
|
||||
|
||||
u32 krb5_decrypt(struct crypto_sync_skcipher *key, void *iv, void *in,
|
||||
void *out, int length);
|
||||
|
||||
int xdr_extend_head(struct xdr_buf *buf, unsigned int base,
|
||||
unsigned int shiftlen);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user