mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 10:33:58 +02:00
[ruby/openssl] Enable HKDF support for LibreSSL 3.6 and later
LibreSSL 3.6 added support for HKDF in EVP. Enable this in ossl_kdf.c.
9bdd39a7e2
This commit is contained in:
parent
63f40a5be5
commit
b6da54c721
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
* Copyright (C) 2007, 2017 Ruby/OpenSSL Project Authors
|
* Copyright (C) 2007, 2017 Ruby/OpenSSL Project Authors
|
||||||
*/
|
*/
|
||||||
#include "ossl.h"
|
#include "ossl.h"
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 6, 0)
|
||||||
# include <openssl/kdf.h>
|
# include <openssl/kdf.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ kdf_scrypt(int argc, VALUE *argv, VALUE self)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 6, 0)
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* KDF.hkdf(ikm, salt:, info:, length:, hash:) -> String
|
* KDF.hkdf(ikm, salt:, info:, length:, hash:) -> String
|
||||||
|
@ -305,7 +305,7 @@ Init_ossl_kdf(void)
|
||||||
#if defined(HAVE_EVP_PBE_SCRYPT)
|
#if defined(HAVE_EVP_PBE_SCRYPT)
|
||||||
rb_define_module_function(mKDF, "scrypt", kdf_scrypt, -1);
|
rb_define_module_function(mKDF, "scrypt", kdf_scrypt, -1);
|
||||||
#endif
|
#endif
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 6, 0)
|
||||||
rb_define_module_function(mKDF, "hkdf", kdf_hkdf, -1);
|
rb_define_module_function(mKDF, "hkdf", kdf_hkdf, -1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue