Some of the documentation had the right explanation but the incorrect function names attached. Change-Id: I7b479dae6d71a5ac7bc86df5a3890508c3b3d09f Reviewed-on: https://boringssl-review.googlesource.com/5090 Reviewed-by: Adam Langley <agl@google.com>kris/onging/CECPQ3_patch15
@@ -207,7 +207,7 @@ OPENSSL_EXPORT void BIO_clear_flags(BIO *bio, int flags); | |||||
* flags on |bio|. */ | * flags on |bio|. */ | ||||
OPENSSL_EXPORT void BIO_set_retry_read(BIO *bio); | OPENSSL_EXPORT void BIO_set_retry_read(BIO *bio); | ||||
/* BIO_set_retry_read sets the |BIO_FLAGS_WRITE| and |BIO_FLAGS_SHOULD_RETRY| | |||||
/* BIO_set_retry_write sets the |BIO_FLAGS_WRITE| and |BIO_FLAGS_SHOULD_RETRY| | |||||
* flags on |bio|. */ | * flags on |bio|. */ | ||||
OPENSSL_EXPORT void BIO_set_retry_write(BIO *bio); | OPENSSL_EXPORT void BIO_set_retry_write(BIO *bio); | ||||
@@ -656,7 +656,7 @@ OPENSSL_EXPORT int BIO_zero_copy_get_read_buf(BIO* bio, | |||||
* error stack. */ | * error stack. */ | ||||
OPENSSL_EXPORT int BIO_zero_copy_get_read_buf_done(BIO* bio, size_t bytes_read); | OPENSSL_EXPORT int BIO_zero_copy_get_read_buf_done(BIO* bio, size_t bytes_read); | ||||
/* BIO_zero_copy_get_write_buf_done initiates a zero copy write operation. | |||||
/* BIO_zero_copy_get_write_buf initiates a zero copy write operation. | |||||
* |out_write_buf| is set to to the internal write buffer, and |out_buf_offset| | * |out_write_buf| is set to to the internal write buffer, and |out_buf_offset| | ||||
* is set to the current write position of |out_write_buf|. | * is set to the current write position of |out_write_buf|. | ||||
* The number of bytes available for write from |out_write_buf| + | * The number of bytes available for write from |out_write_buf| + | ||||
@@ -667,7 +667,7 @@ OPENSSL_EXPORT int BIO_zero_copy_get_read_buf_done(BIO* bio, size_t bytes_read); | |||||
* stack. | * stack. | ||||
* | * | ||||
* The zero copy write operation is completed by calling | * The zero copy write operation is completed by calling | ||||
* |BIO_zero_copy_write_buf_done|. Neither |BIO_zero_copy_get_write_buf| | |||||
* |BIO_zero_copy_get_write_buf_done|. Neither |BIO_zero_copy_get_write_buf| | |||||
* nor any other I/O write operation may be called while a zero copy write | * nor any other I/O write operation may be called while a zero copy write | ||||
* operation is active. */ | * operation is active. */ | ||||
OPENSSL_EXPORT int BIO_zero_copy_get_write_buf(BIO* bio, | OPENSSL_EXPORT int BIO_zero_copy_get_write_buf(BIO* bio, | ||||
@@ -675,8 +675,8 @@ OPENSSL_EXPORT int BIO_zero_copy_get_write_buf(BIO* bio, | |||||
size_t* out_buf_offset, | size_t* out_buf_offset, | ||||
size_t* out_available_bytes); | size_t* out_available_bytes); | ||||
/* BIO_zero_copy_write_buf_done must be called after writing to a BIO using | |||||
* |BIO_zero_copy_get_write_buf_done| to finish the write operation. The | |||||
/* BIO_zero_copy_get_write_buf_done must be called after writing to a BIO using | |||||
* |BIO_zero_copy_get_write_buf| to finish the write operation. The | |||||
* |bytes_written| argument gives the number of bytes written. | * |bytes_written| argument gives the number of bytes written. | ||||
* | * | ||||
* It returns one on success. In case of error it returns zero and pushes to the | * It returns one on success. In case of error it returns zero and pushes to the | ||||
@@ -293,7 +293,7 @@ OPENSSL_EXPORT int CBB_add_u16_length_prefixed(CBB *cbb, CBB *out_contents); | |||||
* big-endian length. It returns one on success or zero on error. */ | * big-endian length. It returns one on success or zero on error. */ | ||||
OPENSSL_EXPORT int CBB_add_u24_length_prefixed(CBB *cbb, CBB *out_contents); | OPENSSL_EXPORT int CBB_add_u24_length_prefixed(CBB *cbb, CBB *out_contents); | ||||
/* CBB_add_asn sets |*out_contents| to a |CBB| into which the contents of an | |||||
/* CBB_add_asn1 sets |*out_contents| to a |CBB| into which the contents of an | |||||
* ASN.1 object can be written. The |tag| argument will be used as the tag for | * ASN.1 object can be written. The |tag| argument will be used as the tag for | ||||
* the object. Passing in |tag| number 31 will return in an error since only | * the object. Passing in |tag| number 31 will return in an error since only | ||||
* single octet identifiers are supported. It returns one on success or zero | * single octet identifiers are supported. It returns one on success or zero | ||||
@@ -314,7 +314,7 @@ OPENSSL_EXPORT int CBB_add_space(CBB *cbb, uint8_t **out_data, size_t len); | |||||
* success and zero otherwise. */ | * success and zero otherwise. */ | ||||
OPENSSL_EXPORT int CBB_add_u8(CBB *cbb, uint8_t value); | OPENSSL_EXPORT int CBB_add_u8(CBB *cbb, uint8_t value); | ||||
/* CBB_add_u8 appends a 16-bit, big-endian number from |value| to |cbb|. It | |||||
/* CBB_add_u16 appends a 16-bit, big-endian number from |value| to |cbb|. It | |||||
* returns one on success and zero otherwise. */ | * returns one on success and zero otherwise. */ | ||||
OPENSSL_EXPORT int CBB_add_u16(CBB *cbb, uint16_t value); | OPENSSL_EXPORT int CBB_add_u16(CBB *cbb, uint16_t value); | ||||
@@ -220,7 +220,7 @@ OPENSSL_EXPORT int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, | |||||
BIGNUM *x, BIGNUM *y, | BIGNUM *x, BIGNUM *y, | ||||
BN_CTX *ctx); | BN_CTX *ctx); | ||||
/* EC_POINT_set_affine_coordinates sets the value of |p| to be (|x|, |y|). The | |||||
/* EC_POINT_set_affine_coordinates_GFp sets the value of |p| to be (|x|, |y|). The | |||||
* |ctx| argument may be used if not NULL. */ | * |ctx| argument may be used if not NULL. */ | ||||
OPENSSL_EXPORT int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, | OPENSSL_EXPORT int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, | ||||
EC_POINT *point, | EC_POINT *point, | ||||
@@ -265,7 +265,7 @@ OPENSSL_EXPORT int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, | |||||
OPENSSL_EXPORT int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, | OPENSSL_EXPORT int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, | ||||
const EC_POINT *a, BN_CTX *ctx); | const EC_POINT *a, BN_CTX *ctx); | ||||
/* EC_POINT_dbl sets |a| equal to minus |a|. It returns one on success and zero | |||||
/* EC_POINT_invert sets |a| equal to minus |a|. It returns one on success and zero | |||||
* otherwise. If |ctx| is not NULL, it may be used. */ | * otherwise. If |ctx| is not NULL, it may be used. */ | ||||
OPENSSL_EXPORT int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, | OPENSSL_EXPORT int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, | ||||
BN_CTX *ctx); | BN_CTX *ctx); | ||||
@@ -192,7 +192,7 @@ OPENSSL_EXPORT int EC_KEY_generate_key(EC_KEY *key); | |||||
OPENSSL_EXPORT EC_KEY *d2i_ECPrivateKey(EC_KEY **out_key, const uint8_t **inp, | OPENSSL_EXPORT EC_KEY *d2i_ECPrivateKey(EC_KEY **out_key, const uint8_t **inp, | ||||
long len); | long len); | ||||
/* i2d_ECParameters marshals an EC private key from |key| to an ASN.1, DER | |||||
/* i2d_ECPrivateKey marshals an EC private key from |key| to an ASN.1, DER | |||||
* structure. If |outp| is not NULL then the result is written to |*outp| and | * structure. If |outp| is not NULL then the result is written to |*outp| and | ||||
* |*outp| is advanced just past the output. It returns the number of bytes in | * |*outp| is advanced just past the output. It returns the number of bytes in | ||||
* the result, whether written or not, or a negative value on error. */ | * the result, whether written or not, or a negative value on error. */ | ||||
@@ -287,7 +287,7 @@ OPENSSL_EXPORT int ERR_get_next_error_library(void); | |||||
/* Deprecated functions. */ | /* Deprecated functions. */ | ||||
/* |ERR_remove_state| calls |ERR_clear_error|. */ | |||||
/* ERR_remove_state calls |ERR_clear_error|. */ | |||||
OPENSSL_EXPORT void ERR_remove_state(unsigned long pid); | OPENSSL_EXPORT void ERR_remove_state(unsigned long pid); | ||||
@@ -377,12 +377,12 @@ OPENSSL_EXPORT int EVP_VerifyFinal(EVP_MD_CTX *ctx, const uint8_t *sig, | |||||
OPENSSL_EXPORT int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, | OPENSSL_EXPORT int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, | ||||
int indent, ASN1_PCTX *pctx); | int indent, ASN1_PCTX *pctx); | ||||
/* EVP_PKEY_print_public prints a textual representation of the private key in | |||||
/* EVP_PKEY_print_private prints a textual representation of the private key in | |||||
* |pkey| to |out|. Returns one on success or zero otherwise. */ | * |pkey| to |out|. Returns one on success or zero otherwise. */ | ||||
OPENSSL_EXPORT int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, | OPENSSL_EXPORT int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, | ||||
int indent, ASN1_PCTX *pctx); | int indent, ASN1_PCTX *pctx); | ||||
/* EVP_PKEY_print_public prints a textual representation of the parameters in | |||||
/* EVP_PKEY_print_params prints a textual representation of the parameters in | |||||
* |pkey| to |out|. Returns one on success or zero otherwise. */ | * |pkey| to |out|. Returns one on success or zero otherwise. */ | ||||
OPENSSL_EXPORT int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, | OPENSSL_EXPORT int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, | ||||
int indent, ASN1_PCTX *pctx); | int indent, ASN1_PCTX *pctx); | ||||
@@ -419,13 +419,13 @@ OPENSSL_EXPORT int PKCS5_PBKDF2_HMAC_SHA1(const char *password, | |||||
* returns the context or NULL on error. */ | * returns the context or NULL on error. */ | ||||
OPENSSL_EXPORT EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); | OPENSSL_EXPORT EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); | ||||
/* EVP_PKEY_CTX_new allocates a fresh |EVP_PKEY_CTX| for a key of type |id| | |||||
/* EVP_PKEY_CTX_new_id allocates a fresh |EVP_PKEY_CTX| for a key of type |id| | |||||
* (e.g. |EVP_PKEY_HMAC|). This can be used for key generation where | * (e.g. |EVP_PKEY_HMAC|). This can be used for key generation where | ||||
* |EVP_PKEY_CTX_new| can't be used because there isn't an |EVP_PKEY| to pass | * |EVP_PKEY_CTX_new| can't be used because there isn't an |EVP_PKEY| to pass | ||||
* it. It returns the context or NULL on error. */ | * it. It returns the context or NULL on error. */ | ||||
OPENSSL_EXPORT EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); | OPENSSL_EXPORT EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); | ||||
/* EVP_KEY_CTX_free frees |ctx| and the data it owns. */ | |||||
/* EVP_PKEY_CTX_free frees |ctx| and the data it owns. */ | |||||
OPENSSL_EXPORT void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); | OPENSSL_EXPORT void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); | ||||
/* EVP_PKEY_CTX_dup allocates a fresh |EVP_PKEY_CTX| and sets it equal to the | /* EVP_PKEY_CTX_dup allocates a fresh |EVP_PKEY_CTX| and sets it equal to the | ||||
@@ -134,7 +134,7 @@ typedef struct crypto_ex_data_st CRYPTO_EX_DATA; | |||||
#if 0 /* Sample */ | #if 0 /* Sample */ | ||||
/* |TYPE_get_ex_new_index| allocates a new index for |TYPE|. See the | |||||
/* TYPE_get_ex_new_index allocates a new index for |TYPE|. See the | |||||
* descriptions of the callback typedefs for details of when they are | * descriptions of the callback typedefs for details of when they are | ||||
* called. Any of the callback arguments may be NULL. The |argl| and |argp| | * called. Any of the callback arguments may be NULL. The |argl| and |argp| | ||||
* arguments are opaque values that are passed to the callbacks. It returns the | * arguments are opaque values that are passed to the callbacks. It returns the | ||||
@@ -146,11 +146,11 @@ OPENSSL_EXPORT int TYPE_get_ex_new_index(long argl, void *argp, | |||||
CRYPTO_EX_dup *dup_func, | CRYPTO_EX_dup *dup_func, | ||||
CRYPTO_EX_free *free_func); | CRYPTO_EX_free *free_func); | ||||
/* |TYPE_set_ex_data| sets an extra data pointer on |t|. The |index| argument | |||||
/* TYPE_set_ex_data sets an extra data pointer on |t|. The |index| argument | |||||
* should have been returned from a previous call to |TYPE_get_ex_new_index|. */ | * should have been returned from a previous call to |TYPE_get_ex_new_index|. */ | ||||
OPENSSL_EXPORT int TYPE_set_ex_data(TYPE *t, int index, void *arg); | OPENSSL_EXPORT int TYPE_set_ex_data(TYPE *t, int index, void *arg); | ||||
/* |TYPE_get_ex_data| returns an extra data pointer for |t|, or NULL if no such | |||||
/* TYPE_get_ex_data returns an extra data pointer for |t|, or NULL if no such | |||||
* pointer exists. The |index| argument should have been returned from a | * pointer exists. The |index| argument should have been returned from a | ||||
* previous call to |TYPE_get_ex_new_index|. */ | * previous call to |TYPE_get_ex_new_index|. */ | ||||
OPENSSL_EXPORT void *TYPE_get_ex_data(const TYPE *t, int index); | OPENSSL_EXPORT void *TYPE_get_ex_data(const TYPE *t, int index); | ||||
@@ -71,7 +71,7 @@ extern "C" { | |||||
/* MD4_DIGEST_LENGTH is the length of an MD4 digest. */ | /* MD4_DIGEST_LENGTH is the length of an MD4 digest. */ | ||||
#define MD4_DIGEST_LENGTH 16 | #define MD4_DIGEST_LENGTH 16 | ||||
/* MD41_Init initialises |md4| and returns one. */ | |||||
/* MD4_Init initialises |md4| and returns one. */ | |||||
OPENSSL_EXPORT int MD4_Init(MD4_CTX *md4); | OPENSSL_EXPORT int MD4_Init(MD4_CTX *md4); | ||||
/* MD4_Update adds |len| bytes from |data| to |md4| and returns one. */ | /* MD4_Update adds |len| bytes from |data| to |md4| and returns one. */ | ||||
@@ -72,7 +72,7 @@ extern "C" { | |||||
/* MD5_DIGEST_LENGTH is the length of an MD5 digest. */ | /* MD5_DIGEST_LENGTH is the length of an MD5 digest. */ | ||||
#define MD5_DIGEST_LENGTH 16 | #define MD5_DIGEST_LENGTH 16 | ||||
/* MD51_Init initialises |md5| and returns one. */ | |||||
/* MD5_Init initialises |md5| and returns one. */ | |||||
OPENSSL_EXPORT int MD5_Init(MD5_CTX *md5); | OPENSSL_EXPORT int MD5_Init(MD5_CTX *md5); | ||||
/* MD5_Update adds |len| bytes from |data| to |md5| and returns one. */ | /* MD5_Update adds |len| bytes from |data| to |md5| and returns one. */ | ||||
@@ -128,7 +128,7 @@ OPENSSL_EXPORT const char *OBJ_nid2sn(int nid); | |||||
/* OBJ_nid2sn returns the long name for |nid|, or NULL if |nid| is unknown. */ | /* OBJ_nid2sn returns the long name for |nid|, or NULL if |nid| is unknown. */ | ||||
OPENSSL_EXPORT const char *OBJ_nid2ln(int nid); | OPENSSL_EXPORT const char *OBJ_nid2ln(int nid); | ||||
/* OBJ_nid2cbs writes |nid| as an ASN.1 OBJECT IDENTIFIER to |out|. It returns | |||||
/* OBJ_nid2cbb writes |nid| as an ASN.1 OBJECT IDENTIFIER to |out|. It returns | |||||
* one on success or zero otherwise. */ | * one on success or zero otherwise. */ | ||||
OPENSSL_EXPORT int OBJ_nid2cbb(CBB *out, int nid); | OPENSSL_EXPORT int OBJ_nid2cbb(CBB *out, int nid); | ||||
@@ -410,7 +410,7 @@ OPENSSL_EXPORT void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); | |||||
OPENSSL_EXPORT void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt); | OPENSSL_EXPORT void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt); | ||||
OPENSSL_EXPORT int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); | OPENSSL_EXPORT int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); | ||||
/* |PEM_def_callback| treats |userdata| as a string and copies it into |buf|, | |||||
/* PEM_def_callback treats |userdata| as a string and copies it into |buf|, | |||||
* assuming its |size| is sufficient. Returns the length of the string, or 0 | * assuming its |size| is sufficient. Returns the length of the string, or 0 | ||||
* if there is not enough room. If either |buf| or |userdata| is NULL, 0 is | * if there is not enough room. If either |buf| or |userdata| is NULL, 0 is | ||||
* returned. Note that this is different from OpenSSL, which prompts for a | * returned. Note that this is different from OpenSSL, which prompts for a | ||||
@@ -246,7 +246,7 @@ OPENSSL_EXPORT int RSA_verify_raw(RSA *rsa, size_t *out_len, uint8_t *out, | |||||
OPENSSL_EXPORT int RSA_private_encrypt(int flen, const uint8_t *from, | OPENSSL_EXPORT int RSA_private_encrypt(int flen, const uint8_t *from, | ||||
uint8_t *to, RSA *rsa, int padding); | uint8_t *to, RSA *rsa, int padding); | ||||
/* RSA_private_encrypt verifies |flen| bytes of signature from |from| using the | |||||
/* RSA_public_decrypt verifies |flen| bytes of signature from |from| using the | |||||
* public key in |rsa| and writes the plaintext to |to|. The |to| buffer must | * public key in |rsa| and writes the plaintext to |to|. The |to| buffer must | ||||
* have at least |RSA_size| bytes of space. It returns the number of bytes | * have at least |RSA_size| bytes of space. It returns the number of bytes | ||||
* written, or -1 on error. The |padding| argument must be one of the | * written, or -1 on error. The |padding| argument must be one of the | ||||
@@ -2407,13 +2407,13 @@ OPENSSL_EXPORT int SSL_CTX_set_tmp_rsa(SSL_CTX *ctx, const RSA *rsa); | |||||
/* SSL_set_tmp_rsa returns one. */ | /* SSL_set_tmp_rsa returns one. */ | ||||
OPENSSL_EXPORT int SSL_set_tmp_rsa(SSL *ssl, const RSA *rsa); | OPENSSL_EXPORT int SSL_set_tmp_rsa(SSL *ssl, const RSA *rsa); | ||||
/* SSL_CTX_get_read_head returns zero. */ | |||||
/* SSL_CTX_get_read_ahead returns zero. */ | |||||
OPENSSL_EXPORT int SSL_CTX_get_read_ahead(const SSL_CTX *ctx); | OPENSSL_EXPORT int SSL_CTX_get_read_ahead(const SSL_CTX *ctx); | ||||
/* SSL_CTX_set_read_ahead does nothing. */ | /* SSL_CTX_set_read_ahead does nothing. */ | ||||
OPENSSL_EXPORT void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes); | OPENSSL_EXPORT void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes); | ||||
/* SSL_get_read_head returns zero. */ | |||||
/* SSL_get_read_ahead returns zero. */ | |||||
OPENSSL_EXPORT int SSL_get_read_ahead(const SSL *s); | OPENSSL_EXPORT int SSL_get_read_ahead(const SSL *s); | ||||
/* SSL_set_read_ahead does nothing. */ | /* SSL_set_read_ahead does nothing. */ | ||||