Procházet zdrojové kódy

Remove app_data from EVP_PKEY_CTX.

It's never used. It's not clear why one would want such a thing.
EVP_PKEY_CTX has no way for callers to register callbacks, which means
there shouldn't be a way for the library to present you an EVP_PKEY_CTX
out-of-context. (Whereas app_data/ex_data makes sense on SSL because of
its numerous callbacks or RSA because of RSA_METHOD.)

Change-Id: I55af537ab101682677af34f6ac1f2c27b5899a89
Reviewed-on: https://boringssl-review.googlesource.com/6849
Reviewed-by: Adam Langley <alangley@gmail.com>
kris/onging/CECPQ3_patch15
David Benjamin před 8 roky
committed by Adam Langley
rodič
revize
b6155e60f3
3 změnil soubory, kde provedl 0 přidání a 16 odebrání
  1. +0
    -6
      crypto/evp/evp_ctx.c
  2. +0
    -2
      crypto/evp/internal.h
  3. +0
    -8
      include/openssl/evp.h

+ 0
- 6
crypto/evp/evp_ctx.c Zobrazit soubor

@@ -193,12 +193,6 @@ err:

EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx) { return ctx->pkey; }

void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data) {
ctx->app_data = data;
}

void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx) { return ctx->app_data; }

int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd,
int p1, void *p2) {
if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl) {


+ 0
- 2
crypto/evp/internal.h Zobrazit soubor

@@ -218,8 +218,6 @@ struct evp_pkey_ctx_st {
int operation;
/* Algorithm specific data */
void *data;
/* Application specific data */
void *app_data;
} /* EVP_PKEY_CTX */;

struct evp_pkey_method_st {


+ 0
- 8
include/openssl/evp.h Zobrazit soubor

@@ -428,14 +428,6 @@ OPENSSL_EXPORT EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
/* EVP_PKEY_CTX_get0_pkey returns the |EVP_PKEY| associated with |ctx|. */
OPENSSL_EXPORT EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);

/* EVP_PKEY_CTX_set_app_data sets an opaque pointer on |ctx|. */
OPENSSL_EXPORT void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);

/* EVP_PKEY_CTX_get_app_data returns the opaque pointer from |ctx| that was
* previously set with |EVP_PKEY_CTX_set_app_data|, or NULL if none has been
* set. */
OPENSSL_EXPORT void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);

/* EVP_PKEY_sign_init initialises an |EVP_PKEY_CTX| for a signing operation. It
* should be called before |EVP_PKEY_sign|.
*


Načítá se…
Zrušit
Uložit