提交 cd4f7cdd 编写于 作者: D Dr. Stephen Henson

Add more return value checking attributes to evp.h and hmac.h

上级 3db24426
...@@ -498,7 +498,7 @@ void EVP_MD_CTX_init(EVP_MD_CTX *ctx); ...@@ -498,7 +498,7 @@ void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx); int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
EVP_MD_CTX *EVP_MD_CTX_create(void); EVP_MD_CTX *EVP_MD_CTX_create(void);
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in); __owur int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in);
void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags); int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags);
...@@ -517,7 +517,7 @@ int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify); ...@@ -517,7 +517,7 @@ int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify);
void EVP_set_pw_prompt(const char *prompt); void EVP_set_pw_prompt(const char *prompt);
char * EVP_get_pw_prompt(void); char * EVP_get_pw_prompt(void);
int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md, __owur int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
const unsigned char *salt, const unsigned char *data, const unsigned char *salt, const unsigned char *data,
int datal, int count, unsigned char *key,unsigned char *iv); int datal, int count, unsigned char *key,unsigned char *iv);
...@@ -603,7 +603,7 @@ BIO_METHOD *BIO_f_md(void); ...@@ -603,7 +603,7 @@ BIO_METHOD *BIO_f_md(void);
BIO_METHOD *BIO_f_base64(void); BIO_METHOD *BIO_f_base64(void);
BIO_METHOD *BIO_f_cipher(void); BIO_METHOD *BIO_f_cipher(void);
BIO_METHOD *BIO_f_reliable(void); BIO_METHOD *BIO_f_reliable(void);
void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,const unsigned char *k, __owur int BIO_set_cipher(BIO *b,const EVP_CIPHER *c,const unsigned char *k,
const unsigned char *i, int enc); const unsigned char *i, int enc);
#endif #endif
......
...@@ -90,16 +90,16 @@ void HMAC_CTX_cleanup(HMAC_CTX *ctx); ...@@ -90,16 +90,16 @@ void HMAC_CTX_cleanup(HMAC_CTX *ctx);
#define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */ #define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */
int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, __owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md); /* deprecated */ const EVP_MD *md); /* deprecated */
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, __owur int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md, ENGINE *impl); const EVP_MD *md, ENGINE *impl);
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); __owur int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); __owur int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
const unsigned char *d, size_t n, unsigned char *md, const unsigned char *d, size_t n, unsigned char *md,
unsigned int *md_len); unsigned int *md_len);
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
#ifdef __cplusplus #ifdef __cplusplus
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册