瀏覽代碼

Correct various documentation typos

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
Kenny Root 9 年之前
committed by Adam Langley
父節點
當前提交
3a9e1fba0e
共有 13 個檔案被更改,包括 25 行新增25 行删除
  1. +5
    -5
      include/openssl/bio.h
  2. +2
    -2
      include/openssl/bytestring.h
  3. +2
    -2
      include/openssl/ec.h
  4. +1
    -1
      include/openssl/ec_key.h
  5. +1
    -1
      include/openssl/err.h
  6. +4
    -4
      include/openssl/evp.h
  7. +3
    -3
      include/openssl/ex_data.h
  8. +1
    -1
      include/openssl/md4.h
  9. +1
    -1
      include/openssl/md5.h
  10. +1
    -1
      include/openssl/obj.h
  11. +1
    -1
      include/openssl/pem.h
  12. +1
    -1
      include/openssl/rsa.h
  13. +2
    -2
      include/openssl/ssl.h

+ 5
- 5
include/openssl/bio.h 查看文件

@@ -207,7 +207,7 @@ OPENSSL_EXPORT void BIO_clear_flags(BIO *bio, int flags);
* flags on |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|. */
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. */
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|
* is set to the current write position of |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.
*
* 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
* operation is active. */
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_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.
*
* It returns one on success. In case of error it returns zero and pushes to the


+ 2
- 2
include/openssl/bytestring.h 查看文件

@@ -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. */
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
* 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
@@ -314,7 +314,7 @@ OPENSSL_EXPORT int CBB_add_space(CBB *cbb, uint8_t **out_data, size_t len);
* success and zero otherwise. */
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. */
OPENSSL_EXPORT int CBB_add_u16(CBB *cbb, uint16_t value);



+ 2
- 2
include/openssl/ec.h 查看文件

@@ -220,7 +220,7 @@ OPENSSL_EXPORT int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
BIGNUM *x, BIGNUM *y,
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. */
OPENSSL_EXPORT int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group,
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,
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. */
OPENSSL_EXPORT int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a,
BN_CTX *ctx);


+ 1
- 1
include/openssl/ec_key.h 查看文件

@@ -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,
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
* |*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. */


+ 1
- 1
include/openssl/err.h 查看文件

@@ -287,7 +287,7 @@ OPENSSL_EXPORT int ERR_get_next_error_library(void);

/* 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);




+ 4
- 4
include/openssl/evp.h 查看文件

@@ -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,
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. */
OPENSSL_EXPORT int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
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. */
OPENSSL_EXPORT int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
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. */
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
* |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. */
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);

/* EVP_PKEY_CTX_dup allocates a fresh |EVP_PKEY_CTX| and sets it equal to the


+ 3
- 3
include/openssl/ex_data.h 查看文件

@@ -134,7 +134,7 @@ typedef struct crypto_ex_data_st CRYPTO_EX_DATA;

#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
* 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
@@ -146,11 +146,11 @@ OPENSSL_EXPORT int TYPE_get_ex_new_index(long argl, void *argp,
CRYPTO_EX_dup *dup_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|. */
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
* previous call to |TYPE_get_ex_new_index|. */
OPENSSL_EXPORT void *TYPE_get_ex_data(const TYPE *t, int index);


+ 1
- 1
include/openssl/md4.h 查看文件

@@ -71,7 +71,7 @@ extern "C" {
/* MD4_DIGEST_LENGTH is the length of an MD4 digest. */
#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);

/* MD4_Update adds |len| bytes from |data| to |md4| and returns one. */


+ 1
- 1
include/openssl/md5.h 查看文件

@@ -72,7 +72,7 @@ extern "C" {
/* MD5_DIGEST_LENGTH is the length of an MD5 digest. */
#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);

/* MD5_Update adds |len| bytes from |data| to |md5| and returns one. */


+ 1
- 1
include/openssl/obj.h 查看文件

@@ -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. */
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. */
OPENSSL_EXPORT int OBJ_nid2cbb(CBB *out, int nid);



+ 1
- 1
include/openssl/pem.h 查看文件

@@ -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 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
* 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


+ 1
- 1
include/openssl/rsa.h 查看文件

@@ -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,
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
* 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


+ 2
- 2
include/openssl/ssl.h 查看文件

@@ -2407,13 +2407,13 @@ OPENSSL_EXPORT int SSL_CTX_set_tmp_rsa(SSL_CTX *ctx, const RSA *rsa);
/* SSL_set_tmp_rsa returns one. */
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);

/* SSL_CTX_set_read_ahead does nothing. */
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);

/* SSL_set_read_ahead does nothing. */


Loading…
取消
儲存