| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9cebe82 commit 10a7035
10 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,7 @@ keylen_list.forEach(function(key) { | |||
| 18 | 18 | ||
| 19 | 19 | var bench = common.createBenchmark(main, { | |
| 20 | 20 | writes: [500], | |
| 21 | - algo: ['RSA-SHA1', 'RSA-SHA224', 'RSA-SHA256', 'RSA-SHA384', 'RSA-SHA512'], | ||
| 21 | + algo: ['SHA1', 'SHA224', 'SHA256', 'SHA384', 'SHA512'], | ||
| 22 | 22 | keylen: keylen_list, | |
| 23 | 23 | len: [1024, 102400, 2 * 102400, 3 * 102400, 1024 * 1024] | |
| 24 | 24 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -842,28 +842,31 @@ of two ways: | |||
| 842 | 842 | - Using the [`sign.update()`][] and [`sign.sign()`][] methods to produce the | |
| 843 | 843 | signature. | |
| 844 | 844 | ||
| 845 | - The [`crypto.createSign()`][] method is used to create `Sign` instances. `Sign` | ||
| 846 | - objects are not to be created directly using the `new` keyword. | ||
| 845 | + The [`crypto.createSign()`][] method is used to create `Sign` instances. The | ||
| 846 | + argument is the string name of the hash function to use. `Sign` objects are not | ||
| 847 | + to be created directly using the `new` keyword. | ||
| 847 | 848 | ||
| 848 | 849 | Example: Using `Sign` objects as streams: | |
| 849 | 850 | ||
| 850 | 851 | ```js | |
| 851 | 852 | const crypto = require('crypto'); | |
| 852 | - const sign = crypto.createSign('RSA-SHA256'); | ||
| 853 | + const sign = crypto.createSign('SHA256'); | ||
| 853 | 854 | ||
| 854 | 855 | sign.write('some data to sign'); | |
| 855 | 856 | sign.end(); | |
| 856 | 857 | ||
| 857 | 858 | const privateKey = getPrivateKeySomehow(); | |
| 858 | 859 | console.log(sign.sign(privateKey, 'hex')); | |
| 859 | - // Prints: the calculated signature | ||
| 860 | + // Prints: the calculated signature using the specified private key and | ||
| 861 | + // SHA-256. For RSA keys, the algorithm is RSASSA-PKCS1-v1_5 (see padding | ||
| 862 | + // parameter below for RSASSA-PSS). For EC keys, the algorithm is ECDSA. | ||
| 860 | 863 | ``` | |
| 861 | 864 | ||
| 862 | 865 | Example: Using the [`sign.update()`][] and [`sign.sign()`][] methods: | |
| 863 | 866 | ||
| 864 | 867 | ```js | |
| 865 | 868 | const crypto = require('crypto'); | |
| 866 | - const sign = crypto.createSign('RSA-SHA256'); | ||
| 869 | + const sign = crypto.createSign('SHA256'); | ||
| 867 | 870 | ||
| 868 | 871 | sign.update('some data to sign'); | |
| 869 | 872 | ||
@@ -872,27 +875,22 @@ console.log(sign.sign(privateKey, 'hex')); | |||
| 872 | 875 | // Prints: the calculated signature | |
| 873 | 876 | ``` | |
| 874 | 877 | ||
| 875 | - A `Sign` instance can also be created by just passing in the digest | ||
| 876 | - algorithm name, in which case OpenSSL will infer the full signature algorithm | ||
| 877 | - from the type of the PEM-formatted private key, including algorithms that | ||
| 878 | - do not have directly exposed name constants, e.g. 'ecdsa-with-SHA256'. | ||
| 878 | + In some cases, a `Sign` instance can also be created by passing in a signature | ||
| 879 | + algorithm name, such as 'RSA-SHA256'. This will use the corresponding digest | ||
| 880 | + algorithm. This does not work for all signature algorithms, such as | ||
| 881 | + 'ecdsa-with-SHA256'. Use digest names instead. | ||
| 879 | 882 | ||
| 880 | - Example: signing using ECDSA with SHA256 | ||
| 883 | + Example: signing using legacy signature algorithm name | ||
| 881 | 884 | ||
| 882 | 885 | ```js | |
| 883 | 886 | const crypto = require('crypto'); | |
| 884 | - const sign = crypto.createSign('sha256'); | ||
| 887 | + const sign = crypto.createSign('RSA-SHA256'); | ||
| 885 | 888 | ||
| 886 | 889 | sign.update('some data to sign'); | |
| 887 | 890 | ||
| 888 | - const privateKey = | ||
| 889 | - `-----BEGIN EC PRIVATE KEY----- | ||
| 890 | - MHcCAQEEIF+jnWY1D5kbVYDNvxxo/Y+ku2uJPDwS0r/VuPZQrjjVoAoGCCqGSM49 | ||
| 891 | - AwEHoUQDQgAEurOxfSxmqIRYzJVagdZfMMSjRNNhB8i3mXyIMq704m2m52FdfKZ2 | ||
| 892 | - pQhByd5eyj3lgZ7m7jbchtdgyOF8Io/1ng== | ||
| 893 | - -----END EC PRIVATE KEY-----`; | ||
| 894 | - | ||
| 895 | - console.log(sign.sign(privateKey).toString('hex')); | ||
| 891 | + const privateKey = getPrivateKeySomehow(); | ||
| 892 | + console.log(sign.sign(privateKey, 'hex')); | ||
| 893 | + // Prints: the calculated signature | ||
| 896 | 894 | ``` | |
| 897 | 895 | ||
| 898 | 896 | ### sign.sign(private_key[, output_format]) | |
@@ -965,7 +963,7 @@ Example: Using `Verify` objects as streams: | |||
| 965 | 963 | ||
| 966 | 964 | ```js | |
| 967 | 965 | const crypto = require('crypto'); | |
| 968 | - const verify = crypto.createVerify('RSA-SHA256'); | ||
| 966 | + const verify = crypto.createVerify('SHA256'); | ||
| 969 | 967 | ||
| 970 | 968 | verify.write('some data to sign'); | |
| 971 | 969 | verify.end(); | |
@@ -980,7 +978,7 @@ Example: Using the [`verify.update()`][] and [`verify.verify()`][] methods: | |||
| 980 | 978 | ||
| 981 | 979 | ```js | |
| 982 | 980 | const crypto = require('crypto'); | |
| 983 | - const verify = crypto.createVerify('RSA-SHA256'); | ||
| 981 | + const verify = crypto.createVerify('SHA256'); | ||
| 984 | 982 | ||
| 985 | 983 | verify.update('some data to sign'); | |
| 986 | 984 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3993,7 +3993,8 @@ void SignBase::CheckThrow(SignBase::Error error) { | |||
| 3993 | 3993 | ||
| 3994 | 3994 | static bool ApplyRSAOptions(EVP_PKEY* pkey, EVP_PKEY_CTX* pkctx, int padding, | |
| 3995 | 3995 | int salt_len) { | |
| 3996 | - if (pkey->type == EVP_PKEY_RSA || pkey->type == EVP_PKEY_RSA2) { | ||
| 3996 | + if (EVP_PKEY_id(pkey) == EVP_PKEY_RSA || | ||
| 3997 | + EVP_PKEY_id(pkey) == EVP_PKEY_RSA2) { | ||
| 3997 | 3998 | if (EVP_PKEY_CTX_set_rsa_padding(pkctx, padding) <= 0) | |
| 3998 | 3999 | return false; | |
| 3999 | 4000 | if (padding == RSA_PKCS1_PSS_PADDING) { | |
@@ -4102,33 +4103,23 @@ static int Node_SignFinal(EVP_MD_CTX* mdctx, unsigned char* md, | |||
| 4102 | 4103 | if (!EVP_DigestFinal_ex(mdctx, m, &m_len)) | |
| 4103 | 4104 | return rv; | |
| 4104 | 4105 | ||
| 4105 | - if (mdctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) { | ||
| 4106 | - size_t sltmp = static_cast<size_t>(EVP_PKEY_size(pkey)); | ||
| 4107 | - pkctx = EVP_PKEY_CTX_new(pkey, nullptr); | ||
| 4108 | - if (pkctx == nullptr) | ||
| 4109 | - goto err; | ||
| 4110 | - if (EVP_PKEY_sign_init(pkctx) <= 0) | ||
| 4111 | - goto err; | ||
| 4112 | - if (!ApplyRSAOptions(pkey, pkctx, padding, pss_salt_len)) | ||
| 4113 | - goto err; | ||
| 4114 | - if (EVP_PKEY_CTX_set_signature_md(pkctx, mdctx->digest) <= 0) | ||
| 4115 | - goto err; | ||
| 4116 | - if (EVP_PKEY_sign(pkctx, md, &sltmp, m, m_len) <= 0) | ||
| 4117 | - goto err; | ||
| 4118 | - *sig_len = sltmp; | ||
| 4119 | - rv = 1; | ||
| 4120 | - err: | ||
| 4121 | - EVP_PKEY_CTX_free(pkctx); | ||
| 4122 | - return rv; | ||
| 4123 | - } | ||
| 4124 | - | ||
| 4125 | - if (mdctx->digest->sign == nullptr) { | ||
| 4126 | - EVPerr(EVP_F_EVP_SIGNFINAL, EVP_R_NO_SIGN_FUNCTION_CONFIGURED); | ||
| 4127 | - return 0; | ||
| 4128 | - } | ||
| 4129 | - | ||
| 4130 | - return mdctx->digest->sign(mdctx->digest->type, m, m_len, md, sig_len, | ||
| 4131 | - pkey->pkey.ptr); | ||
| 4106 | + size_t sltmp = static_cast<size_t>(EVP_PKEY_size(pkey)); | ||
| 4107 | + pkctx = EVP_PKEY_CTX_new(pkey, nullptr); | ||
| 4108 | + if (pkctx == nullptr) | ||
| 4109 | + goto err; | ||
| 4110 | + if (EVP_PKEY_sign_init(pkctx) <= 0) | ||
| 4111 | + goto err; | ||
| 4112 | + if (!ApplyRSAOptions(pkey, pkctx, padding, pss_salt_len)) | ||
| 4113 | + goto err; | ||
| 4114 | + if (EVP_PKEY_CTX_set_signature_md(pkctx, EVP_MD_CTX_md(mdctx)) <= 0) | ||
| 4115 | + goto err; | ||
| 4116 | + if (EVP_PKEY_sign(pkctx, md, &sltmp, m, m_len) <= 0) | ||
| 4117 | + goto err; | ||
| 4118 | + *sig_len = sltmp; | ||
| 4119 | + rv = 1; | ||
| 4120 | + err: | ||
| 4121 | + EVP_PKEY_CTX_free(pkctx); | ||
| 4122 | + return rv; | ||
| 4132 | 4123 | } | |
| 4133 | 4124 | ||
| 4134 | 4125 | SignBase::Error Sign::SignFinal(const char* key_pem, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ const BN = asn1.bignum; | |||
| 8 | 8 | const id_at_commonName = [ 2, 5, 4, 3 ]; | |
| 9 | 9 | const rsaEncryption = [1, 2, 840, 113549, 1, 1, 1]; | |
| 10 | 10 | const sha256WithRSAEncryption = [1, 2, 840, 113549, 1, 1, 11]; | |
| 11 | - const sigalg = 'RSA-SHA256'; | ||
| 11 | + const digest = 'SHA256'; | ||
| 12 | 12 | ||
| 13 | 13 | const private_key = fs.readFileSync('./0-dns-key.pem'); | |
| 14 | 14 | // public key file can be generated from the private key with | |
@@ -59,7 +59,7 @@ const tbs = { | |||
| 59 | 59 | ||
| 60 | 60 | const tbs_der = rfc5280.TBSCertificate.encode(tbs, 'der'); | |
| 61 | 61 | ||
| 62 | - const sign = crypto.createSign(sigalg); | ||
| 62 | + const sign = crypto.createSign(digest); | ||
| 63 | 63 | sign.update(tbs_der); | |
| 64 | 64 | const signature = sign.sign(private_key); | |
| 65 | 65 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -404,28 +404,28 @@ assert.throws(function() { | |||
| 404 | 404 | }, /^Error: Digest method not supported$/); | |
| 405 | 405 | ||
| 406 | 406 | // Test signing and verifying | |
| 407 | - const s1 = crypto.createSign('RSA-SHA1') | ||
| 407 | + const s1 = crypto.createSign('SHA1') | ||
| 408 | 408 | .update('Test123') | |
| 409 | 409 | .sign(keyPem, 'base64'); | |
| 410 | - const s1Verified = crypto.createVerify('RSA-SHA1') | ||
| 410 | + const s1Verified = crypto.createVerify('SHA1') | ||
| 411 | 411 | .update('Test') | |
| 412 | 412 | .update('123') | |
| 413 | 413 | .verify(certPem, s1, 'base64'); | |
| 414 | 414 | assert.strictEqual(s1Verified, true, 'sign and verify (base 64)'); | |
| 415 | 415 | ||
| 416 | - const s2 = crypto.createSign('RSA-SHA256') | ||
| 416 | + const s2 = crypto.createSign('SHA256') | ||
| 417 | 417 | .update('Test123') | |
| 418 | 418 | .sign(keyPem); // binary | |
| 419 | - const s2Verified = crypto.createVerify('RSA-SHA256') | ||
| 419 | + const s2Verified = crypto.createVerify('SHA256') | ||
| 420 | 420 | .update('Test') | |
| 421 | 421 | .update('123') | |
| 422 | 422 | .verify(certPem, s2); // binary | |
| 423 | 423 | assert.strictEqual(s2Verified, true, 'sign and verify (binary)'); | |
| 424 | 424 | ||
| 425 | - const s3 = crypto.createSign('RSA-SHA1') | ||
| 425 | + const s3 = crypto.createSign('SHA1') | ||
| 426 | 426 | .update('Test123') | |
| 427 | 427 | .sign(keyPem, 'buffer'); | |
| 428 | - const s3Verified = crypto.createVerify('RSA-SHA1') | ||
| 428 | + const s3Verified = crypto.createVerify('SHA1') | ||
| 429 | 429 | .update('Test') | |
| 430 | 430 | .update('123') | |
| 431 | 431 | .verify(certPem, s3); | |
@@ -569,8 +569,8 @@ const d = crypto.createDiffieHellman(p, 'hex'); | |||
| 569 | 569 | assert.strictEqual(d.verifyError, DH_NOT_SUITABLE_GENERATOR); | |
| 570 | 570 | ||
| 571 | 571 | // Test RSA key signing/verification | |
| 572 | - const rsaSign = crypto.createSign('RSA-SHA1'); | ||
| 573 | - const rsaVerify = crypto.createVerify('RSA-SHA1'); | ||
| 572 | + const rsaSign = crypto.createSign('SHA1'); | ||
| 573 | + const rsaVerify = crypto.createVerify('SHA1'); | ||
| 574 | 574 | assert.ok(rsaSign instanceof crypto.Sign); | |
| 575 | 575 | assert.ok(rsaVerify instanceof crypto.Verify); | |
| 576 | 576 | ||
@@ -606,13 +606,13 @@ assert.strictEqual(rsaVerify.verify(rsaPubPem, rsaSignature, 'hex'), true); | |||
| 606 | 606 | '8195e0268da7eda23d9825ac43c724e86ceeee0d0d4465678652ccaf6501' + | |
| 607 | 607 | '0ddfb299bedeb1ad'; | |
| 608 | 608 | ||
| 609 | - const sign = crypto.createSign('RSA-SHA256'); | ||
| 609 | + const sign = crypto.createSign('SHA256'); | ||
| 610 | 610 | sign.update(input); | |
| 611 | 611 | ||
| 612 | 612 | const output = sign.sign(privateKey, 'hex'); | |
| 613 | 613 | assert.strictEqual(output, signature); | |
| 614 | 614 | ||
| 615 | - const verify = crypto.createVerify('RSA-SHA256'); | ||
| 615 | + const verify = crypto.createVerify('SHA256'); | ||
| 616 | 616 | verify.update(input); | |
| 617 | 617 | ||
| 618 | 618 | assert.strictEqual(verify.verify(publicKey, signature, 'hex'), true); | |
@@ -631,11 +631,11 @@ assert.strictEqual(rsaVerify.verify(rsaPubPem, rsaSignature, 'hex'), true); | |||
| 631 | 631 | ||
| 632 | 632 | // DSA signatures vary across runs so there is no static string to verify | |
| 633 | 633 | // against | |
| 634 | - const sign = crypto.createSign('DSS1'); | ||
| 634 | + const sign = crypto.createSign('SHA1'); | ||
| 635 | 635 | sign.update(input); | |
| 636 | 636 | const signature = sign.sign(privateKey, 'hex'); | |
| 637 | 637 | ||
| 638 | - const verify = crypto.createVerify('DSS1'); | ||
| 638 | + const verify = crypto.createVerify('SHA1'); | ||
| 639 | 639 | verify.update(input); | |
| 640 | 640 | ||
| 641 | 641 | assert.strictEqual(verify.verify(publicKey, signature, 'hex'), true); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -132,8 +132,8 @@ test_rsa('RSA_PKCS1_PADDING'); | |||
| 132 | 132 | test_rsa('RSA_PKCS1_OAEP_PADDING'); | |
| 133 | 133 | ||
| 134 | 134 | // Test RSA key signing/verification | |
| 135 | - let rsaSign = crypto.createSign('RSA-SHA1'); | ||
| 136 | - let rsaVerify = crypto.createVerify('RSA-SHA1'); | ||
| 135 | + let rsaSign = crypto.createSign('SHA1'); | ||
| 136 | + let rsaVerify = crypto.createVerify('SHA1'); | ||
| 137 | 137 | assert.ok(rsaSign); | |
| 138 | 138 | assert.ok(rsaVerify); | |
| 139 | 139 | ||
@@ -152,19 +152,19 @@ rsaVerify.update(rsaPubPem); | |||
| 152 | 152 | assert.strictEqual(rsaVerify.verify(rsaPubPem, rsaSignature, 'hex'), true); | |
| 153 | 153 | ||
| 154 | 154 | // Test RSA key signing/verification with encrypted key | |
| 155 | - rsaSign = crypto.createSign('RSA-SHA1'); | ||
| 155 | + rsaSign = crypto.createSign('SHA1'); | ||
| 156 | 156 | rsaSign.update(rsaPubPem); | |
| 157 | 157 | assert.doesNotThrow(() => { | |
| 158 | 158 | const signOptions = { key: rsaKeyPemEncrypted, passphrase: 'password' }; | |
| 159 | 159 | rsaSignature = rsaSign.sign(signOptions, 'hex'); | |
| 160 | 160 | }); | |
| 161 | 161 | assert.strictEqual(rsaSignature, expectedSignature); | |
| 162 | 162 | ||
| 163 | - rsaVerify = crypto.createVerify('RSA-SHA1'); | ||
| 163 | + rsaVerify = crypto.createVerify('SHA1'); | ||
| 164 | 164 | rsaVerify.update(rsaPubPem); | |
| 165 | 165 | assert.strictEqual(rsaVerify.verify(rsaPubPem, rsaSignature, 'hex'), true); | |
| 166 | 166 | ||
| 167 | - rsaSign = crypto.createSign('RSA-SHA1'); | ||
| 167 | + rsaSign = crypto.createSign('SHA1'); | ||
| 168 | 168 | rsaSign.update(rsaPubPem); | |
| 169 | 169 | assert.throws(() => { | |
| 170 | 170 | const signOptions = { key: rsaKeyPemEncrypted, passphrase: 'wrong' }; | |
@@ -188,16 +188,28 @@ assert.throws(() => { | |||
| 188 | 188 | '8195e0268da7eda23d9825ac43c724e86ceeee0d0d4465678652ccaf6501' + | |
| 189 | 189 | '0ddfb299bedeb1ad'; | |
| 190 | 190 | ||
| 191 | - const sign = crypto.createSign('RSA-SHA256'); | ||
| 191 | + const sign = crypto.createSign('SHA256'); | ||
| 192 | 192 | sign.update(input); | |
| 193 | 193 | ||
| 194 | 194 | const output = sign.sign(privateKey, 'hex'); | |
| 195 | 195 | assert.strictEqual(signature, output); | |
| 196 | 196 | ||
| 197 | - const verify = crypto.createVerify('RSA-SHA256'); | ||
| 197 | + const verify = crypto.createVerify('SHA256'); | ||
| 198 | 198 | verify.update(input); | |
| 199 | 199 | ||
| 200 | 200 | assert.strictEqual(verify.verify(publicKey, signature, 'hex'), true); | |
| 201 | + | ||
| 202 | + // Test the legacy signature algorithm name. | ||
| 203 | + const sign2 = crypto.createSign('RSA-SHA256'); | ||
| 204 | + sign2.update(input); | ||
| 205 | + | ||
| 206 | + const output2 = sign2.sign(privateKey, 'hex'); | ||
| 207 | + assert.strictEqual(signature, output2); | ||
| 208 | + | ||
| 209 | + const verify2 = crypto.createVerify('SHA256'); | ||
| 210 | + verify2.update(input); | ||
| 211 | + | ||
| 212 | + assert.strictEqual(verify2.verify(publicKey, signature, 'hex'), true); | ||
| 201 | 213 | } | |
| 202 | 214 | ||
| 203 | 215 | ||
@@ -209,14 +221,24 @@ assert.throws(() => { | |||
| 209 | 221 | ||
| 210 | 222 | // DSA signatures vary across runs so there is no static string to verify | |
| 211 | 223 | // against | |
| 212 | - const sign = crypto.createSign('DSS1'); | ||
| 224 | + const sign = crypto.createSign('SHA1'); | ||
| 213 | 225 | sign.update(input); | |
| 214 | 226 | const signature = sign.sign(dsaKeyPem, 'hex'); | |
| 215 | 227 | ||
| 216 | - const verify = crypto.createVerify('DSS1'); | ||
| 228 | + const verify = crypto.createVerify('SHA1'); | ||
| 217 | 229 | verify.update(input); | |
| 218 | 230 | ||
| 219 | 231 | assert.strictEqual(verify.verify(dsaPubPem, signature, 'hex'), true); | |
| 232 | + | ||
| 233 | + // Test the legacy 'DSS1' name. | ||
| 234 | + const sign2 = crypto.createSign('DSS1'); | ||
| 235 | + sign2.update(input); | ||
| 236 | + const signature2 = sign2.sign(dsaKeyPem, 'hex'); | ||
| 237 | + | ||
| 238 | + const verify2 = crypto.createVerify('DSS1'); | ||
| 239 | + verify2.update(input); | ||
| 240 | + | ||
| 241 | + assert.strictEqual(verify2.verify(dsaPubPem, signature2, 'hex'), true); | ||
| 220 | 242 | } | |
| 221 | 243 | ||
| 222 | 244 | ||
@@ -226,7 +248,7 @@ assert.throws(() => { | |||
| 226 | 248 | const input = 'I AM THE WALRUS'; | |
| 227 | 249 | ||
| 228 | 250 | { | |
| 229 | - const sign = crypto.createSign('DSS1'); | ||
| 251 | + const sign = crypto.createSign('SHA1'); | ||
| 230 | 252 | sign.update(input); | |
| 231 | 253 | assert.throws(() => { | |
| 232 | 254 | sign.sign({ key: dsaKeyPemEncrypted, passphrase: 'wrong' }, 'hex'); | |
@@ -236,7 +258,7 @@ const input = 'I AM THE WALRUS'; | |||
| 236 | 258 | { | |
| 237 | 259 | // DSA signatures vary across runs so there is no static string to verify | |
| 238 | 260 | // against | |
| 239 | - const sign = crypto.createSign('DSS1'); | ||
| 261 | + const sign = crypto.createSign('SHA1'); | ||
| 240 | 262 | sign.update(input); | |
| 241 | 263 | ||
| 242 | 264 | let signature; | |
@@ -245,7 +267,7 @@ const input = 'I AM THE WALRUS'; | |||
| 245 | 267 | signature = sign.sign(signOptions, 'hex'); | |
| 246 | 268 | }); | |
| 247 | 269 | ||
| 248 | - const verify = crypto.createVerify('DSS1'); | ||
| 270 | + const verify = crypto.createVerify('SHA1'); | ||
| 249 | 271 | verify.update(input); | |
| 250 | 272 | ||
| 251 | 273 | assert.strictEqual(verify.verify(dsaPubPem, signature, 'hex'), true); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments