Retire MD4. It has been depecared in OpenSSL since 3.0.0 [7 Sep 2021]

parent 517be163
...@@ -98,6 +98,10 @@ BLOB xkey.use() ...@@ -98,6 +98,10 @@ BLOB xkey.use()
Wrap the key in a blob to be passed to `crypto.verifier()`_ Wrap the key in a blob to be passed to `crypto.verifier()`_
Restricted to: ``vcl_init``.
.. _xkey.pem_pubkey(): .. _xkey.pem_pubkey():
VOID xkey.pem_pubkey(STRING) VOID xkey.pem_pubkey(STRING)
...@@ -111,13 +115,17 @@ comprise RSA and DSA. ...@@ -111,13 +115,17 @@ comprise RSA and DSA.
Any error is fatal to vcl initialization. Any error is fatal to vcl initialization.
Restricted to: ``vcl_init``.
.. _xkey.pem_privkey(): .. _xkey.pem_privkey():
VOID xkey.pem_privkey(STRING, STRING password=0) VOID xkey.pem_privkey(STRING, STRING password=0)
------------------------------------------------ ------------------------------------------------
Create a key from the PEM-encoded private key, optionally decrypting Create a key from the PEM-encoded private key, optionally decrypting
it using `password`. it using _password_.
The cryptographic method to be used and the key length are The cryptographic method to be used and the key length are
automatically determined from _pem_. Typically supported methods automatically determined from _pem_. Typically supported methods
...@@ -125,6 +133,10 @@ comprise RSA and DSA. ...@@ -125,6 +133,10 @@ comprise RSA and DSA.
Any error is fatal to vcl initialization. Any error is fatal to vcl initialization.
Restricted to: ``vcl_init``.
.. _xkey.rsa(): .. _xkey.rsa():
VOID xkey.rsa(BLOB n, BLOB e, [BLOB d]) VOID xkey.rsa(BLOB n, BLOB e, [BLOB d])
...@@ -134,6 +146,10 @@ Create an RSA key from the parameters n, e, and optionally d. ...@@ -134,6 +146,10 @@ Create an RSA key from the parameters n, e, and optionally d.
Any error is fatal to vcl initialization. Any error is fatal to vcl initialization.
Restricted to: ``vcl_init``.
.. _crypto.verifier(): .. _crypto.verifier():
new xverifier = crypto.verifier(ENUM digest, [STRING pem], [BLOB key]) new xverifier = crypto.verifier(ENUM digest, [STRING pem], [BLOB key])
...@@ -142,7 +158,7 @@ new xverifier = crypto.verifier(ENUM digest, [STRING pem], [BLOB key]) ...@@ -142,7 +158,7 @@ new xverifier = crypto.verifier(ENUM digest, [STRING pem], [BLOB key])
:: ::
new xverifier = crypto.verifier( new xverifier = crypto.verifier(
ENUM {md_null, md4, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest, ENUM {md_null, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest,
[STRING pem], [STRING pem],
[BLOB key] [BLOB key]
) )
...@@ -189,9 +205,10 @@ BOOL xverifier.valid(BLOB signature) ...@@ -189,9 +205,10 @@ BOOL xverifier.valid(BLOB signature)
Check if _signature_ is a valid signature for the _verifier_ object Check if _signature_ is a valid signature for the _verifier_ object
given the previous updates. given the previous updates.
Note that after calling .valid(), .update can be called again to add Note that after calling `xverifier.valid()`, `xverifier.update()` can
additional data, which can then be validated against a (different) be called again to add additional data, which can then be validated
signature using another call to .valid(). against a (different) signature using another call to
`xverifier.valid()`.
.. _crypto.signer(): .. _crypto.signer():
...@@ -201,7 +218,7 @@ new xsigner = crypto.signer(ENUM digest, [STRING pem], [BLOB key]) ...@@ -201,7 +218,7 @@ new xsigner = crypto.signer(ENUM digest, [STRING pem], [BLOB key])
:: ::
new xsigner = crypto.signer( new xsigner = crypto.signer(
ENUM {md_null, md4, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest, ENUM {md_null, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest,
[STRING pem], [STRING pem],
[BLOB key] [BLOB key]
) )
......
This diff is collapsed.
...@@ -39,9 +39,6 @@ static const EVP_MD *mdtbl[_MD_E_MAX]; ...@@ -39,9 +39,6 @@ static const EVP_MD *mdtbl[_MD_E_MAX];
void void
md_init (void) { md_init (void) {
mdtbl[md_null] = EVP_md_null(); mdtbl[md_null] = EVP_md_null();
#ifndef OPENSSL_NO_MD4
mdtbl[md4] = EVP_md4();
#endif
#ifndef OPENSSL_NO_MD5 #ifndef OPENSSL_NO_MD5
mdtbl[md5] = EVP_md5(); mdtbl[md5] = EVP_md5();
#endif #endif
......
VMODENUM(md_null) VMODENUM(md_null)
VMODENUM(md4)
VMODENUM(md5) VMODENUM(md5)
VMODENUM(sha1) VMODENUM(sha1)
//VMODENUM(dss) //VMODENUM(dss)
......
...@@ -155,7 +155,7 @@ new xverifier = crypto.verifier(ENUM digest, [STRING pem], [BLOB key]) ...@@ -155,7 +155,7 @@ new xverifier = crypto.verifier(ENUM digest, [STRING pem], [BLOB key])
:: ::
new xverifier = crypto.verifier( new xverifier = crypto.verifier(
ENUM {md_null, md4, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest, ENUM {md_null, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest,
[STRING pem], [STRING pem],
[BLOB key] [BLOB key]
) )
...@@ -215,7 +215,7 @@ new xsigner = crypto.signer(ENUM digest, [STRING pem], [BLOB key]) ...@@ -215,7 +215,7 @@ new xsigner = crypto.signer(ENUM digest, [STRING pem], [BLOB key])
:: ::
new xsigner = crypto.signer( new xsigner = crypto.signer(
ENUM {md_null, md4, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest, ENUM {md_null, md5, sha1, sha224, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest,
[STRING pem], [STRING pem],
[BLOB key] [BLOB key]
) )
......
...@@ -83,7 +83,7 @@ Any error is fatal to vcl initialization. ...@@ -83,7 +83,7 @@ Any error is fatal to vcl initialization.
$Restrict vcl_init $Restrict vcl_init
$Object verifier(ENUM {md_null, md4, md5, sha1, sha224, $Object verifier(ENUM {md_null, md5, sha1, sha224,
sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest,
[STRING pem], [BLOB key]) [STRING pem], [BLOB key])
...@@ -122,7 +122,7 @@ be called again to add additional data, which can then be validated ...@@ -122,7 +122,7 @@ be called again to add additional data, which can then be validated
against a (different) signature using another call to against a (different) signature using another call to
`xverifier.valid()`. `xverifier.valid()`.
$Object signer(ENUM {md_null, md4, md5, sha1, sha224, $Object signer(ENUM {md_null, md5, sha1, sha224,
sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest, sha256, sha384, sha512, ripemd160, rmd160, whirlpool} digest,
[STRING pem], [BLOB key]) [STRING pem], [BLOB key])
......
...@@ -7,7 +7,6 @@ set -eux ...@@ -7,7 +7,6 @@ set -eux
cd $(dirname $0) cd $(dirname $0)
typeset -ra mds=( typeset -ra mds=(
md4
md5 md5
rmd160 rmd160
sha1 sha1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment