summaryrefslogtreecommitdiff
path: root/src/include/openssl/aead.h
diff options
context:
space:
mode:
authorRobert Sloan <varomodt@google.com>2017-06-27 17:41:42 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-27 17:41:42 +0000
commit8ad267508423079ed3e4df6ffbde0557a0484f2c (patch)
tree8748d2e9bcbf9c92e85f8610584df6dbbc52c6a5 /src/include/openssl/aead.h
parentaa3f4e316b2fcec0f088e72d2932114d911003a7 (diff)
parentb2737a239d086eb6ce131a148d0d6ad870cb34c7 (diff)
downloadboringssl-8ad267508423079ed3e4df6ffbde0557a0484f2c.tar.gz
external/boringssl: Sync to 3120950b1e27635ee9b9d167052ce11ce9c96fd4. am: e56da3e0a1
am: b2737a239d Change-Id: I5474e24d62345d1ec1edba2ca6169d88494454ba
Diffstat (limited to 'src/include/openssl/aead.h')
-rw-r--r--src/include/openssl/aead.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/include/openssl/aead.h b/src/include/openssl/aead.h
index 29944384..e0d64325 100644
--- a/src/include/openssl/aead.h
+++ b/src/include/openssl/aead.h
@@ -223,8 +223,8 @@ OPENSSL_EXPORT void EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx);
* |EVP_AEAD_nonce_length| for this AEAD.
*
* |EVP_AEAD_CTX_seal| never results in a partial output. If |max_out_len| is
- * insufficient, zero will be returned. (In this case, |*out_len| is set to
- * zero.)
+ * insufficient, zero will be returned. If any error occurs, |out| will be
+ * filled with zero bytes and |*out_len| set to zero.
*
* If |in| and |out| alias then |out| must be == |in|. */
OPENSSL_EXPORT int EVP_AEAD_CTX_seal(const EVP_AEAD_CTX *ctx, uint8_t *out,
@@ -232,6 +232,7 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_seal(const EVP_AEAD_CTX *ctx, uint8_t *out,
const uint8_t *nonce, size_t nonce_len,
const uint8_t *in, size_t in_len,
const uint8_t *ad, size_t ad_len);
+
/* EVP_AEAD_CTX_open authenticates |in_len| bytes from |in| and |ad_len| bytes
* from |ad| and decrypts at most |in_len| bytes into |out|. It returns one on
* success and zero otherwise.
@@ -247,8 +248,8 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_seal(const EVP_AEAD_CTX *ctx, uint8_t *out,
* |EVP_AEAD_nonce_length| for this AEAD.
*
* |EVP_AEAD_CTX_open| never results in a partial output. If |max_out_len| is
- * insufficient, zero will be returned. (In this case, |*out_len| is set to
- * zero.)
+ * insufficient, zero will be returned. If any error occurs, |out| will be
+ * filled with zero bytes and |*out_len| set to zero.
*
* If |in| and |out| alias then |out| must be == |in|. */
OPENSSL_EXPORT int EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, uint8_t *out,
@@ -273,8 +274,9 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, uint8_t *out,
* |EVP_AEAD_nonce_length| for this AEAD.
*
* |EVP_AEAD_CTX_seal_scatter| never results in a partial output. If
- * |max_out_tag_len| is insufficient, zero will be returned. (In this case,
- * |*out_tag_len| is set to zero.)
+ * |max_out_tag_len| is insufficient, zero will be returned. If any error
+ * occurs, |out| and |out_tag| will be filled with zero bytes and |*out_tag_len|
+ * set to zero.
*
* If |in| and |out| alias then |out| must be == |in|. |out_tag| may not alias
* any other argument. */
@@ -295,7 +297,8 @@ OPENSSL_EXPORT int EVP_AEAD_CTX_seal_scatter(
* The length of |nonce|, |nonce_len|, must be equal to the result of
* |EVP_AEAD_nonce_length| for this AEAD.
*
- * |EVP_AEAD_CTX_open_gather| never results in a partial output.
+ * |EVP_AEAD_CTX_open_gather| never results in a partial output. If any error
+ * occurs, |out| will be filled with zero bytes.
*
* If |in| and |out| alias then |out| must be == |in|. */
OPENSSL_EXPORT int EVP_AEAD_CTX_open_gather(