Ver a proveniência

Document failure conditions of some EVP, HMAC, and CBB functions

- Document failure conditions of EVP_MD_CTX_copy_ex,
  EVP_DigestInit_ex, HMAC_Init_ex, and CBB_init

Change-Id: I643d1b92e88e7f690fa555f7d908317a23e5cd95
Reviewed-on: https://boringssl-review.googlesource.com/30964
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
kris/onging/CECPQ3_patch15
Joshua Liebow-Feeser há 6 anos
committed by CQ bot account: commit-bot@chromium.org
ascendente
cometimento
dea6d90de2
3 ficheiros alterados com 4 adições e 4 eliminações
  1. +1
    -1
      include/openssl/bytestring.h
  2. +2
    -2
      include/openssl/digest.h
  3. +1
    -1
      include/openssl/hmac.h

+ 1
- 1
include/openssl/bytestring.h Ver ficheiro

@@ -340,7 +340,7 @@ OPENSSL_EXPORT void CBB_zero(CBB *cbb);

// CBB_init initialises |cbb| with |initial_capacity|. Since a |CBB| grows as
// needed, the |initial_capacity| is just a hint. It returns one on success or
// zero on error.
// zero on allocation failure.
OPENSSL_EXPORT int CBB_init(CBB *cbb, size_t initial_capacity);

// CBB_init_fixed initialises |cbb| to write to |len| bytes at |buf|. Since


+ 2
- 2
include/openssl/digest.h Ver ficheiro

@@ -119,7 +119,7 @@ OPENSSL_EXPORT int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
OPENSSL_EXPORT void EVP_MD_CTX_free(EVP_MD_CTX *ctx);

// EVP_MD_CTX_copy_ex sets |out|, which must already be initialised, to be a
// copy of |in|. It returns one on success and zero on error.
// copy of |in|. It returns one on success and zero on allocation failure.
OPENSSL_EXPORT int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);

// EVP_MD_CTX_reset calls |EVP_MD_CTX_cleanup| followed by |EVP_MD_CTX_init|. It
@@ -131,7 +131,7 @@ OPENSSL_EXPORT int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);

// EVP_DigestInit_ex configures |ctx|, which must already have been
// initialised, for a fresh hashing operation using |type|. It returns one on
// success and zero otherwise.
// success and zero on allocation failure.
OPENSSL_EXPORT int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type,
ENGINE *engine);



+ 1
- 1
include/openssl/hmac.h Ver ficheiro

@@ -105,7 +105,7 @@ OPENSSL_EXPORT void HMAC_CTX_free(HMAC_CTX *ctx);
// function and |key| as the key. For a non-initial call, |md| may be NULL, in
// which case the previous hash function will be used. If the hash function has
// not changed and |key| is NULL, |ctx| reuses the previous key. It returns one
// on success or zero otherwise.
// on success or zero on allocation failure.
//
// WARNING: NULL and empty keys are ambiguous on non-initial calls. Passing NULL
// |key| but repeating the previous |md| reuses the previous key rather than the


Carregando…
Cancelar
Guardar