diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-07-09 16:48:40 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-07-09 16:48:40 +0000 |
commit | fbc9a8cee2c0213445a857d1e5b39482ee3aedec (patch) | |
tree | 228aba4d363f78f7bf217ff7551003812f3f0a27 /lib/libcrypto | |
parent | a09e7ba366c7d57fdd0f032225a8a4a7fb906045 (diff) |
Replace local typedef with spelling out the struct name
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/kdf/tls1_prf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libcrypto/kdf/tls1_prf.c b/lib/libcrypto/kdf/tls1_prf.c index 837416c640c..3ea7329f360 100644 --- a/lib/libcrypto/kdf/tls1_prf.c +++ b/lib/libcrypto/kdf/tls1_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls1_prf.c,v 1.16 2024/07/09 16:47:36 tb Exp $ */ +/* $OpenBSD: tls1_prf.c,v 1.17 2024/07/09 16:48:39 tb Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project * 2016. @@ -74,18 +74,18 @@ static int tls1_prf_alg(const EVP_MD *md, #define TLS1_PRF_MAXBUF 1024 -typedef struct { +struct tls1_prf_ctx { const EVP_MD *md; unsigned char *sec; size_t seclen; unsigned char seed[TLS1_PRF_MAXBUF]; size_t seedlen; -} TLS1_PRF_PKEY_CTX; +}; static int pkey_tls1_prf_init(EVP_PKEY_CTX *ctx) { - TLS1_PRF_PKEY_CTX *kctx; + struct tls1_prf_ctx *kctx; if ((kctx = calloc(1, sizeof(*kctx))) == NULL) { KDFerror(ERR_R_MALLOC_FAILURE); @@ -99,7 +99,7 @@ pkey_tls1_prf_init(EVP_PKEY_CTX *ctx) static void pkey_tls1_prf_cleanup(EVP_PKEY_CTX *ctx) { - TLS1_PRF_PKEY_CTX *kctx = ctx->data; + struct tls1_prf_ctx *kctx = ctx->data; freezero(kctx->sec, kctx->seclen); explicit_bzero(kctx->seed, kctx->seedlen); free(kctx); @@ -108,7 +108,7 @@ pkey_tls1_prf_cleanup(EVP_PKEY_CTX *ctx) static int pkey_tls1_prf_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) { - TLS1_PRF_PKEY_CTX *kctx = ctx->data; + struct tls1_prf_ctx *kctx = ctx->data; switch (type) { case EVP_PKEY_CTRL_TLS_MD: kctx->md = p2; @@ -159,7 +159,7 @@ pkey_tls1_prf_ctrl_str(EVP_PKEY_CTX *ctx, return 0; } if (strcmp(type, "md") == 0) { - TLS1_PRF_PKEY_CTX *kctx = ctx->data; + struct tls1_prf_ctx *kctx = ctx->data; const EVP_MD *md = EVP_get_digestbyname(value); if (md == NULL) { @@ -190,7 +190,7 @@ static int pkey_tls1_prf_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen) { - TLS1_PRF_PKEY_CTX *kctx = ctx->data; + struct tls1_prf_ctx *kctx = ctx->data; if (kctx->md == NULL) { KDFerror(KDF_R_MISSING_MESSAGE_DIGEST); return 0; |