From 99c1d9af689e5325f3cf535c4007b3aeb8325229 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 10 Jan 2023 14:54:04 +0100 Subject: Update - This is an automated commit --- alarm/node_modules/node-forge/tests/aes-speed.js | 62 - alarm/node_modules/node-forge/tests/common.html | 84 - alarm/node_modules/node-forge/tests/common.js | 2199 -------------------- alarm/node_modules/node-forge/tests/favicon.ico | 0 alarm/node_modules/node-forge/tests/flash/Test.as | 96 - .../node-forge/tests/flash/build-flash.xml | 7 - .../node_modules/node-forge/tests/flash/index.html | 27 - .../node-forge/tests/forge_ssl/forge/__init__.py | 0 .../node-forge/tests/forge_ssl/forge/_ssl.c | 1770 ---------------- .../tests/forge_ssl/forge/socketmodule.h | 268 --- .../node-forge/tests/forge_ssl/forge/ssl.py | 486 ----- .../node-forge/tests/forge_ssl/setup.py | 12 - alarm/node_modules/node-forge/tests/form.html | 150 -- alarm/node_modules/node-forge/tests/form.js | 40 - alarm/node_modules/node-forge/tests/heartbleed.js | 55 - alarm/node_modules/node-forge/tests/http.html | 229 -- alarm/node_modules/node-forge/tests/index.html | 64 - alarm/node_modules/node-forge/tests/keygen.html | 56 - alarm/node_modules/node-forge/tests/login.css | 26 - alarm/node_modules/node-forge/tests/loginDemo.html | 56 - alarm/node_modules/node-forge/tests/loginDemo.js | 149 -- .../node-forge/tests/nodejs-create-cert.js | 110 - .../node-forge/tests/nodejs-create-csr.js | 66 - .../node-forge/tests/nodejs-create-pkcs12.js | 160 -- alarm/node_modules/node-forge/tests/nodejs-imap.js | 46 - alarm/node_modules/node-forge/tests/nodejs-tls.js | 189 -- .../node-forge/tests/nodejs-ws-webid.js | 491 ----- alarm/node_modules/node-forge/tests/nodejs-ws.js | 166 -- .../node_modules/node-forge/tests/performance.html | 550 ----- .../node_modules/node-forge/tests/policyserver.py | 112 - alarm/node_modules/node-forge/tests/result.txt | 1 - alarm/node_modules/node-forge/tests/screen.css | 61 - alarm/node_modules/node-forge/tests/server.crt | 26 - alarm/node_modules/node-forge/tests/server.key | 27 - alarm/node_modules/node-forge/tests/server.py | 184 -- .../node_modules/node-forge/tests/socketPool.html | 299 --- alarm/node_modules/node-forge/tests/tasks.html | 53 - alarm/node_modules/node-forge/tests/tasks.js | 378 ---- alarm/node_modules/node-forge/tests/tls.html | 426 ---- alarm/node_modules/node-forge/tests/webid.html | 110 - alarm/node_modules/node-forge/tests/webid.js | 313 --- alarm/node_modules/node-forge/tests/ws-webid.js | 132 -- alarm/node_modules/node-forge/tests/ws.js | 237 --- alarm/node_modules/node-forge/tests/xhr.html | 87 - alarm/node_modules/node-forge/tests/xhr.js | 590 ------ 45 files changed, 10650 deletions(-) delete mode 100644 alarm/node_modules/node-forge/tests/aes-speed.js delete mode 100644 alarm/node_modules/node-forge/tests/common.html delete mode 100644 alarm/node_modules/node-forge/tests/common.js delete mode 100644 alarm/node_modules/node-forge/tests/favicon.ico delete mode 100644 alarm/node_modules/node-forge/tests/flash/Test.as delete mode 100644 alarm/node_modules/node-forge/tests/flash/build-flash.xml delete mode 100644 alarm/node_modules/node-forge/tests/flash/index.html delete mode 100644 alarm/node_modules/node-forge/tests/forge_ssl/forge/__init__.py delete mode 100644 alarm/node_modules/node-forge/tests/forge_ssl/forge/_ssl.c delete mode 100644 alarm/node_modules/node-forge/tests/forge_ssl/forge/socketmodule.h delete mode 100644 alarm/node_modules/node-forge/tests/forge_ssl/forge/ssl.py delete mode 100644 alarm/node_modules/node-forge/tests/forge_ssl/setup.py delete mode 100644 alarm/node_modules/node-forge/tests/form.html delete mode 100644 alarm/node_modules/node-forge/tests/form.js delete mode 100644 alarm/node_modules/node-forge/tests/heartbleed.js delete mode 100644 alarm/node_modules/node-forge/tests/http.html delete mode 100644 alarm/node_modules/node-forge/tests/index.html delete mode 100644 alarm/node_modules/node-forge/tests/keygen.html delete mode 100644 alarm/node_modules/node-forge/tests/login.css delete mode 100644 alarm/node_modules/node-forge/tests/loginDemo.html delete mode 100644 alarm/node_modules/node-forge/tests/loginDemo.js delete mode 100644 alarm/node_modules/node-forge/tests/nodejs-create-cert.js delete mode 100644 alarm/node_modules/node-forge/tests/nodejs-create-csr.js delete mode 100644 alarm/node_modules/node-forge/tests/nodejs-create-pkcs12.js delete mode 100644 alarm/node_modules/node-forge/tests/nodejs-imap.js delete mode 100644 alarm/node_modules/node-forge/tests/nodejs-tls.js delete mode 100644 alarm/node_modules/node-forge/tests/nodejs-ws-webid.js delete mode 100644 alarm/node_modules/node-forge/tests/nodejs-ws.js delete mode 100644 alarm/node_modules/node-forge/tests/performance.html delete mode 100755 alarm/node_modules/node-forge/tests/policyserver.py delete mode 100644 alarm/node_modules/node-forge/tests/result.txt delete mode 100644 alarm/node_modules/node-forge/tests/screen.css delete mode 100644 alarm/node_modules/node-forge/tests/server.crt delete mode 100644 alarm/node_modules/node-forge/tests/server.key delete mode 100755 alarm/node_modules/node-forge/tests/server.py delete mode 100644 alarm/node_modules/node-forge/tests/socketPool.html delete mode 100644 alarm/node_modules/node-forge/tests/tasks.html delete mode 100644 alarm/node_modules/node-forge/tests/tasks.js delete mode 100644 alarm/node_modules/node-forge/tests/tls.html delete mode 100644 alarm/node_modules/node-forge/tests/webid.html delete mode 100644 alarm/node_modules/node-forge/tests/webid.js delete mode 100644 alarm/node_modules/node-forge/tests/ws-webid.js delete mode 100644 alarm/node_modules/node-forge/tests/ws.js delete mode 100644 alarm/node_modules/node-forge/tests/xhr.html delete mode 100644 alarm/node_modules/node-forge/tests/xhr.js (limited to 'alarm/node_modules/node-forge/tests') diff --git a/alarm/node_modules/node-forge/tests/aes-speed.js b/alarm/node_modules/node-forge/tests/aes-speed.js deleted file mode 100644 index 2049a8a..0000000 --- a/alarm/node_modules/node-forge/tests/aes-speed.js +++ /dev/null @@ -1,62 +0,0 @@ -var forge = require('../js/forge'); - -console.log('Times in 1000s of bytes/sec processed.'); - -aes_128('AES-CBC'); -aes_128('AES-CFB'); -aes_128('AES-OFB'); -aes_128('AES-CTR'); -aes_128('AES-GCM'); - -function aes_128(algorithm) { - console.log('Running ' + algorithm + ' for 5 seconds...'); - - var size = 1024; - var key = forge.random.getBytesSync(16); - var iv = forge.random.getBytes(algorithm === 'AES-GCM' ? 12 : 16); - var plain = forge.random.getBytesSync(size); - - // run for 5 seconds - var start = new Date().getTime(); - - var now; - var totalEncrypt = 0; - var totalDecrypt = 0; - var cipher; - var count = 0; - var passed = 0; - while(passed < 5000) { - var input = forge.util.createBuffer(plain); - - // encrypt, only measuring update() and finish() - cipher = forge.cipher.createCipher(algorithm, key); - cipher.start({iv: iv}); - now = new Date().getTime(); - cipher.update(input); - cipher.finish(); - totalEncrypt += new Date().getTime() - now; - - var ciphertext = cipher.output; - var tag = cipher.mode.tag; - count += cipher.output.length(); - - // decrypt, only measuring update() and finish() - cipher = forge.cipher.createDecipher(algorithm, key); - cipher.start({iv: iv, tag: tag}); - now = new Date().getTime(); - cipher.update(ciphertext); - if(!cipher.finish()) { - throw new Error('Decryption error.'); - } - totalDecrypt += new Date().getTime() - now; - - passed = new Date().getTime() - start; - } - - count = count / 1000; - totalEncrypt /= 1000; - totalDecrypt /= 1000; - console.log('encrypt: ' + (count / totalEncrypt) + ' k/sec'); - console.log('decrypt: ' + (count / totalDecrypt) + ' k/sec'); - console.log(); -} diff --git a/alarm/node_modules/node-forge/tests/common.html b/alarm/node_modules/node-forge/tests/common.html deleted file mode 100644 index 0fb4705..0000000 --- a/alarm/node_modules/node-forge/tests/common.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Forge Common Test - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Common Tests

-
- -
- -
-
    -
  • Test various Forge components.
  • -
  • See JavaScript console for more detailed output.
  • -
-
- -
-Control - - -
- Scroll Tests -
- - - bits -
- -
-Progress -Status: ?
-Pass: ?/?
-Fail: ? -
- -
-Tests -
-
- -
- - - diff --git a/alarm/node_modules/node-forge/tests/common.js b/alarm/node_modules/node-forge/tests/common.js deleted file mode 100644 index 57dfbc4..0000000 --- a/alarm/node_modules/node-forge/tests/common.js +++ /dev/null @@ -1,2199 +0,0 @@ -/** - * Forge Common Tests - * - * @author Dave Longley - * - * Copyright (c) 2009-2012 Digital Bazaar, Inc. All rights reserved. - */ -jQuery(function($) -{ - // logging category - var cat = 'forge.tests.common'; - - // local alias - var forge = window.forge; - - var tests = []; - var passed = 0; - var failed = 0; - - var init = function() - { - passed = failed = 0; - $('.ready,.testing,.pass,.fail') - .removeClass('ready testing pass fail'); - $('#status') - .text('Ready.') - .addClass('ready'); - $('#total').text(tests.length); - $('#pass').text(passed); - $('#fail').text(failed); - $('.expect').empty(); - $('.result').empty(); - $('.time').empty(); - $('.timePer').empty(); - $('#start').attr('disabled', ''); - }; - - var start = function() - { - $('#start').attr('disabled', 'true'); - // meta! use tasks to run the task tests - forge.task.start({ - type: 'test', - run: function(task) { - task.next('starting', function(task) { - forge.log.debug(cat, 'start'); - $('#status') - .text('Testing...') - .addClass('testing') - .removeClass('idle'); - }); - $.each(tests, function(i, test) { - task.next('test', function(task) { - var title = $('li:first', test.container); - if($('#scroll:checked').length === 1) - { - $('html,body').animate({scrollTop: title.offset().top}); - } - title.addClass('testing'); - test.run(task, test); - }); - task.next('test', function(task) { - $('li:first', test.container).removeClass('testing'); - }); - }); - task.next('success', function(task) { - forge.log.debug(cat, 'done'); - if(failed === 0) { - $('#status') - .text('PASS') - .addClass('pass') - .removeClass('testing'); - } else { - // FIXME: should just be hitting failure() below - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }, - failure: function() { - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }; - - $('#start').click(function() { - start(); - }); - - $('#reset').click(function() { - init(); - }); - - $('#keygen').click(function() { - var bits = $('#bits')[0].value; - var keys = forge.pki.rsa.generateKeyPair(bits); - forge.log.debug(cat, 'generating ' + bits + '-bit RSA key-pair...'); - setTimeout(function() - { - forge.log.debug(cat, 'private key:', keys.privateKey); - forge.log.debug(cat, forge.pki.privateKeyToPem(keys.privateKey)); - forge.log.debug(cat, 'public key:', keys.publicKey); - forge.log.debug(cat, forge.pki.publicKeyToPem(keys.publicKey)); - - forge.log.debug(cat, 'testing sign/verify...'); - setTimeout(function() - { - // do sign/verify test - try - { - var md = forge.md.sha1.create(); - md.update('foo'); - var signature = keys.privateKey.sign(md); - keys.publicKey.verify(md.digest().getBytes(), signature); - forge.log.debug(cat, 'sign/verify success'); - } - catch(ex) - { - forge.log.error(cat, 'sign/verify failure', ex); - } - }, 0); - }, 0); - }); - - $('#certgen').click(function() { - var bits = $('#bits')[0].value; - forge.log.debug(cat, 'generating ' + bits + - '-bit RSA key-pair and certificate...'); - setTimeout(function() - { - try - { - var keys = forge.pki.rsa.generateKeyPair(bits); - var cert = forge.pki.createCertificate(); - cert.serialNumber = '01'; - cert.validity.notBefore = new Date(); - cert.validity.notAfter = new Date(); - cert.validity.notAfter.setFullYear( - cert.validity.notBefore.getFullYear() + 1); - var attrs = [{ - name: 'commonName', - value: 'mycert' - }, { - name: 'countryName', - value: 'US' - }, { - shortName: 'ST', - value: 'Virginia' - }, { - name: 'localityName', - value: 'Blacksburg' - }, { - name: 'organizationName', - value: 'Test' - }, { - shortName: 'OU', - value: 'Test' - }]; - cert.setSubject(attrs); - cert.setIssuer(attrs); - cert.setExtensions([{ - name: 'basicConstraints', - cA: true - }, { - name: 'keyUsage', - keyCertSign: true - }, { - name: 'subjectAltName', - altNames: [{ - type: 6, // URI - value: 'http://localhost/dataspace/person/myname#this' - }] - }]); - // FIXME: add subjectKeyIdentifier extension - // FIXME: add authorityKeyIdentifier extension - cert.publicKey = keys.publicKey; - - // self-sign certificate - cert.sign(keys.privateKey); - - forge.log.debug(cat, 'certificate:', cert); - //forge.log.debug(cat, - // forge.asn1.prettyPrint(forge.pki.certificateToAsn1(cert))); - forge.log.debug(cat, forge.pki.certificateToPem(cert)); - - // verify certificate - forge.log.debug(cat, 'verified', cert.verify(cert)); - } - catch(ex) - { - forge.log.error(cat, ex, ex.message ? ex.message : ''); - } - }, 0); - }); - - var addTest = function(name, run) - { - var container = $('