From 949ac08befdd6ea334a61ad077800b20ad064a8c Mon Sep 17 00:00:00 2001 From: dokutoku <3729541-dokutoku@users.noreply.gitlab.com> Date: Sun, 11 Apr 2021 17:12:11 +0900 Subject: [PATCH] Uncomment some of the code. --- source/libressl_d/openssl/bio.d | 44 ++++++++---------------------- source/libressl_d/openssl/buffer.d | 8 ++---- source/libressl_d/openssl/md5.d | 8 ++---- source/libressl_d/openssl/sha.d | 40 +++++++-------------------- 4 files changed, 25 insertions(+), 75 deletions(-) diff --git a/source/libressl_d/openssl/bio.d b/source/libressl_d/openssl/bio.d index 1480c6b..7503ca4 100755 --- a/source/libressl_d/openssl/bio.d +++ b/source/libressl_d/openssl/bio.d @@ -868,20 +868,14 @@ int BIO_get_shutdown(.BIO* a); void BIO_set_shutdown(.BIO* a, int shut); void BIO_vfree(.BIO* a); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int BIO_read(.BIO* b, void* data, int len) -+/ +int BIO_read(.BIO* b, void* data, int len); -/+ //__attribute__((__bounded__(__string__, 2, 3))); -int BIO_gets(.BIO* bp, char* buf, int size) -+/ +int BIO_gets(.BIO* bp, char* buf, int size); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int BIO_write(.BIO* b, const (void)* data, int len) -+/ +int BIO_write(.BIO* b, const (void)* data, int len); int BIO_puts(.BIO* bp, const (char)* buf); int BIO_indent(.BIO* b, int indent, int max); @@ -974,45 +968,29 @@ void BIO_copy_next_retry(.BIO* b); /*core.stdc.config.c_long BIO_ghbn_ctrl(int cmd, int iarg, char* arg); */ //#if defined(__MINGW_PRINTF_FORMAT) - /+ //__attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2))); - int BIO_printf(.BIO* bio, const (char)* format, ...) - +/ + int BIO_printf(.BIO* bio, const (char)* format, ...); - /+ //__attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 0), __nonnull__(2))); - int BIO_vprintf(.BIO* bio, const (char)* format, core.stdc.stdarg.va_list args) - +/ + int BIO_vprintf(.BIO* bio, const (char)* format, core.stdc.stdarg.va_list args); - /+ //__attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 4), __nonnull__(3))); - int BIO_snprintf(char* buf, size_t n, const (char)* format, ...) - +/ + int BIO_snprintf(char* buf, size_t n, const (char)* format, ...); - /+ //__attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0), __nonnull__(3))); - int BIO_vsnprintf(char* buf, size_t n, const (char)* format, core.stdc.stdarg.va_list args) - +/ + int BIO_vsnprintf(char* buf, size_t n, const (char)* format, core.stdc.stdarg.va_list args); //#else - /+ //__attribute__((__format__(__printf__, 2, 3), __nonnull__(2))); - int BIO_printf(.BIO* bio, const (char)* format, ...) - +/ + int BIO_printf(.BIO* bio, const (char)* format, ...); - /+ //__attribute__((__format__(__printf__, 2, 0), __nonnull__(2))); - int BIO_vprintf(.BIO* bio, const (char)* format, core.stdc.stdarg.va_list args) - +/ + int BIO_vprintf(.BIO* bio, const (char)* format, core.stdc.stdarg.va_list args); - /+ //__attribute__((__deprecated__, __format__(__printf__, 3, 4), __nonnull__(3))); - int BIO_snprintf(char* buf, size_t n, const (char)* format, ...) - +/ + int BIO_snprintf(char* buf, size_t n, const (char)* format, ...); - /+ //__attribute__((__deprecated__, __format__(__printf__, 3, 0), __nonnull__(3))); - int BIO_vsnprintf(char* buf, size_t n, const (char)* format, core.stdc.stdarg.va_list args) - +/ + int BIO_vsnprintf(char* buf, size_t n, const (char)* format, core.stdc.stdarg.va_list args); //#endif /* BEGIN ERROR CODES */ diff --git a/source/libressl_d/openssl/buffer.d b/source/libressl_d/openssl/buffer.d index f2ceace..fc8852b 100755 --- a/source/libressl_d/openssl/buffer.d +++ b/source/libressl_d/openssl/buffer.d @@ -103,15 +103,11 @@ void BUF_reverse(ubyte* out_, const (ubyte)* in_, size_t siz); /* safe string functions */ -/+ //__attribute__((__bounded__(__string__, 1, 3))); -size_t BUF_strlcpy(char* dst, const (char)* src, size_t siz) -+/ +size_t BUF_strlcpy(char* dst, const (char)* src, size_t siz); -/+ //__attribute__((__bounded__(__string__, 1, 3))); -size_t BUF_strlcat(char* dst, const (char)* src, size_t siz) -+/ +size_t BUF_strlcat(char* dst, const (char)* src, size_t siz); //#endif /* BEGIN ERROR CODES */ diff --git a/source/libressl_d/openssl/md5.d b/source/libressl_d/openssl/md5.d index 4cf3655..92d230b 100755 --- a/source/libressl_d/openssl/md5.d +++ b/source/libressl_d/openssl/md5.d @@ -101,16 +101,12 @@ alias MD5_CTX = .MD5state_st; int MD5_Init(.MD5_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int MD5_Update(.MD5_CTX* c, const (void)* data, size_t len) -+/ +int MD5_Update(.MD5_CTX* c, const (void)* data, size_t len); int MD5_Final(ubyte* md, .MD5_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 1, 2))); -ubyte* MD5(const (ubyte)* d, size_t n, ubyte* md) -+/ +ubyte* MD5(const (ubyte)* d, size_t n, ubyte* md); void MD5_Transform(.MD5_CTX* c, const (ubyte)* b); diff --git a/source/libressl_d/openssl/sha.d b/source/libressl_d/openssl/sha.d index 79997a0..53dba53 100755 --- a/source/libressl_d/openssl/sha.d +++ b/source/libressl_d/openssl/sha.d @@ -111,17 +111,13 @@ alias SHA_CTX = SHAstate_st; //#if !defined(OPENSSL_NO_SHA1) int SHA1_Init(.SHA_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int SHA1_Update(.SHA_CTX* c, const (void)* data, size_t len) -+/ +int SHA1_Update(.SHA_CTX* c, const (void)* data, size_t len); int SHA1_Final(ubyte* md, .SHA_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 1, 2))); -ubyte* SHA1(const (ubyte)* d, size_t n, ubyte* md) -+/ +ubyte* SHA1(const (ubyte)* d, size_t n, ubyte* md); void SHA1_Transform(.SHA_CTX* c, const (ubyte)* data); //#endif @@ -151,31 +147,23 @@ alias SHA256_CTX = .SHA256state_st; //#if !defined(OPENSSL_NO_SHA256) int SHA224_Init(.SHA256_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int SHA224_Update(.SHA256_CTX* c, const (void)* data, size_t len) -+/ +int SHA224_Update(.SHA256_CTX* c, const (void)* data, size_t len); int SHA224_Final(ubyte* md, .SHA256_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 1, 2))); -ubyte* SHA224(const (ubyte)* d, size_t n, ubyte* md) -+/ +ubyte* SHA224(const (ubyte)* d, size_t n, ubyte* md); int SHA256_Init(.SHA256_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int SHA256_Update(.SHA256_CTX* c, const (void)* data, size_t len) -+/ +int SHA256_Update(.SHA256_CTX* c, const (void)* data, size_t len); int SHA256_Final(ubyte* md, .SHA256_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 1, 2))); -ubyte* SHA256(const (ubyte)* d, size_t n, ubyte* md) -+/ +ubyte* SHA256(const (ubyte)* d, size_t n, ubyte* md); void SHA256_Transform(.SHA256_CTX* c, const (ubyte)* data); //#endif @@ -222,31 +210,23 @@ alias SHA512_CTX = .SHA512state_st; //#if !defined(OPENSSL_NO_SHA512) int SHA384_Init(.SHA512_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int SHA384_Update(.SHA512_CTX* c, const (void)* data, size_t len) -+/ +int SHA384_Update(.SHA512_CTX* c, const (void)* data, size_t len); int SHA384_Final(ubyte* md, .SHA512_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 1, 2))); -ubyte* SHA384(const (ubyte)* d, size_t n, ubyte* md) -+/ +ubyte* SHA384(const (ubyte)* d, size_t n, ubyte* md); int SHA512_Init(.SHA512_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 2, 3))); -int SHA512_Update(.SHA512_CTX* c, const (void)* data, size_t len) -+/ +int SHA512_Update(.SHA512_CTX* c, const (void)* data, size_t len); int SHA512_Final(ubyte* md, .SHA512_CTX* c); -/+ //__attribute__((__bounded__(__buffer__, 1, 2))); -ubyte* SHA512(const (ubyte)* d, size_t n, ubyte* md) -+/ +ubyte* SHA512(const (ubyte)* d, size_t n, ubyte* md); void SHA512_Transform(.SHA512_CTX* c, const (ubyte)* data); //#endif