mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
[ruby/openssl] const correct ossl_bin2hex()
This helper only reads from its in parameter. Making that const avoids a couple of casts in an upcoming change. https://github.com/ruby/openssl/commit/970d5764e3
This commit is contained in:
parent
2e828dd98f
commit
9dfb7bd7d4
@ -122,7 +122,7 @@ ossl_buf2str(char *buf, int len)
|
||||
}
|
||||
|
||||
void
|
||||
ossl_bin2hex(unsigned char *in, char *out, size_t inlen)
|
||||
ossl_bin2hex(const unsigned char *in, char *out, size_t inlen)
|
||||
{
|
||||
const char *hex = "0123456789abcdef";
|
||||
size_t i;
|
||||
|
||||
@ -131,7 +131,7 @@ do{\
|
||||
* Convert binary string to hex string. The caller is responsible for
|
||||
* ensuring out has (2 * len) bytes of capacity.
|
||||
*/
|
||||
void ossl_bin2hex(unsigned char *in, char *out, size_t len);
|
||||
void ossl_bin2hex(const unsigned char *in, char *out, size_t len);
|
||||
|
||||
/*
|
||||
* Our default PEM callback
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user