Browse Source

Add EVP_AEAD_CTX_aead.

Code acting generically on an EVP_AEAD_CTX may wish to get at the
underlying EVP_AEAD.

Change-Id: I9cc905522ba76402bda4c255aa1488158323b02c
Reviewed-on: https://boringssl-review.googlesource.com/11085
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Matt Braithwaite <mab@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 8 years ago
committed by CQ bot account: commit-bot@chromium.org
parent
commit
c446ce5294
2 changed files with 6 additions and 0 deletions
  1. +2
    -0
      crypto/cipher/aead.c
  2. +4
    -0
      include/openssl/aead.h

+ 2
- 0
crypto/cipher/aead.c View File

@@ -144,6 +144,8 @@ error:
return 0;
}

const EVP_AEAD *EVP_AEAD_CTX_aead(const EVP_AEAD_CTX *ctx) { return ctx->aead; }

int EVP_AEAD_CTX_get_iv(const EVP_AEAD_CTX *ctx, const uint8_t **out_iv,
size_t *out_len) {
if (ctx->aead->get_iv == NULL) {


+ 4
- 0
include/openssl/aead.h View File

@@ -256,6 +256,10 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, uint8_t *out,
const uint8_t *in, size_t in_len,
const uint8_t *ad, size_t ad_len);

/* EVP_AEAD_CTX_aead returns the underlying AEAD for |ctx|, or NULL if one has
* not been set. */
OPENSSL_EXPORT const EVP_AEAD *EVP_AEAD_CTX_aead(const EVP_AEAD_CTX *ctx);


/* TLS-specific AEAD algorithms.
*


Loading…
Cancel
Save