Skip to content

Commit

Permalink
Rename env_md{,_ctx}_st to evp_md{,_ctx}_st
Browse files Browse the repository at this point in the history
As everyone knows (and who doesn't know will immediately guess), EVP is
short for envelope. Most structs backing the public EVP_* types are called
evp_*. For the EVP_MD and EVP_MD_CTX types, someone used env_md_st and
env_md_ctx_st, which, as jsing pointed out, may or may not be related to
a much less obvious abbreviation of envelope. It could also simply have
been for reasons of inconsistency.

Be all that as it may: rename these structs to use the evp_* namespace
to match all the other EVP types, as well as upstream.

ok jsing
  • Loading branch information
botovq committed Aug 11, 2023
1 parent ea7ffa3 commit 7d242c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/libcrypto/evp/evp_local.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: evp_local.h,v 1.3 2023/03/01 11:16:06 tb Exp $ */
/* $OpenBSD: evp_local.h,v 1.4 2023/08/11 05:10:35 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
Expand Down Expand Up @@ -115,7 +115,7 @@ struct evp_pkey_st {
STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
} /* EVP_PKEY */;

struct env_md_st {
struct evp_md_st {
int type;
int pkey_type;
int md_size;
Expand All @@ -132,7 +132,7 @@ struct env_md_st {
int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
} /* EVP_MD */;

struct env_md_ctx_st {
struct evp_md_ctx_st {
const EVP_MD *digest;
ENGINE *engine; /* functional reference if 'digest' is ENGINE-provided */
unsigned long flags;
Expand Down
6 changes: 3 additions & 3 deletions lib/libcrypto/ossl_typ.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ossl_typ.h,v 1.29 2023/08/11 04:45:26 tb Exp $ */
/* $OpenBSD: ossl_typ.h,v 1.30 2023/08/11 05:10:35 tb Exp $ */
/* ====================================================================
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
*
Expand Down Expand Up @@ -99,8 +99,8 @@ typedef struct comp_method_st COMP_METHOD;

typedef struct evp_cipher_st EVP_CIPHER;
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
typedef struct env_md_st EVP_MD;
typedef struct env_md_ctx_st EVP_MD_CTX;
typedef struct evp_md_st EVP_MD;
typedef struct evp_md_ctx_st EVP_MD_CTX;
typedef struct evp_pkey_st EVP_PKEY;

typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
Expand Down

0 comments on commit 7d242c1

Please sign in to comment.