diff options
author | David Benjamin <davidben@google.com> | 2016-03-19 12:32:14 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-21 16:49:10 -0400 |
commit | 04f6b0fd9110c85c3c0d6d1172005d1c6755ac86 (patch) | |
tree | 3ce2eb3e6743161c6753a5344424a8fe72a0d97e /crypto/evp | |
parent | 52d86d9b8da9916acf337126a9ced850cb5ab2d3 (diff) |
RT4660: BIO_METHODs should be const.
BIO_new, etc., don't need a non-const BIO_METHOD. This allows all the
built-in method tables to live in .rodata.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/bio_b64.c | 4 | ||||
-rw-r--r-- | crypto/evp/bio_enc.c | 4 | ||||
-rw-r--r-- | crypto/evp/bio_md.c | 4 | ||||
-rw-r--r-- | crypto/evp/bio_ok.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c index 097b0958f1..93e4166b48 100644 --- a/crypto/evp/bio_b64.c +++ b/crypto/evp/bio_b64.c @@ -93,7 +93,7 @@ typedef struct b64_struct { char tmp[B64_BLOCK_SIZE]; } BIO_B64_CTX; -static BIO_METHOD methods_b64 = { +static const BIO_METHOD methods_b64 = { BIO_TYPE_BASE64, "base64 encoding", b64_write, b64_read, @@ -105,7 +105,7 @@ static BIO_METHOD methods_b64 = { b64_callback_ctrl, }; -BIO_METHOD *BIO_f_base64(void) +const BIO_METHOD *BIO_f_base64(void) { return (&methods_b64); } diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index 9754031e2b..e89c1df098 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -90,7 +90,7 @@ typedef struct enc_struct { char buf[ENC_BLOCK_SIZE + BUF_OFFSET + 2]; } BIO_ENC_CTX; -static BIO_METHOD methods_enc = { +static const BIO_METHOD methods_enc = { BIO_TYPE_CIPHER, "cipher", enc_write, enc_read, @@ -102,7 +102,7 @@ static BIO_METHOD methods_enc = { enc_callback_ctrl, }; -BIO_METHOD *BIO_f_cipher(void) +const BIO_METHOD *BIO_f_cipher(void) { return (&methods_enc); } diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c index 30a506ebba..90dffa1313 100644 --- a/crypto/evp/bio_md.c +++ b/crypto/evp/bio_md.c @@ -78,7 +78,7 @@ static int md_new(BIO *h); static int md_free(BIO *data); static long md_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); -static BIO_METHOD methods_md = { +static const BIO_METHOD methods_md = { BIO_TYPE_MD, "message digest", md_write, md_read, @@ -90,7 +90,7 @@ static BIO_METHOD methods_md = { md_callback_ctrl, }; -BIO_METHOD *BIO_f_md(void) +const BIO_METHOD *BIO_f_md(void) { return (&methods_md); } diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index ec5d7199f5..a29777ced0 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -155,7 +155,7 @@ typedef struct ok_struct { unsigned char buf[IOBS]; } BIO_OK_CTX; -static BIO_METHOD methods_ok = { +static const BIO_METHOD methods_ok = { BIO_TYPE_CIPHER, "reliable", ok_write, ok_read, @@ -167,7 +167,7 @@ static BIO_METHOD methods_ok = { ok_callback_ctrl, }; -BIO_METHOD *BIO_f_reliable(void) +const BIO_METHOD *BIO_f_reliable(void) { return (&methods_ok); } |