Coder Social home page Coder Social logo

dnssec-oracle's Introduction

dnssec-oracle's People

Contributors

arachnid avatar decanus avatar jablko avatar makoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnssec-oracle's Issues

Untested line in algorithms/RSASHA256Algorithm.sol:23

Mutation:
File: algorithms/RSASHA256Algorithm.sol
Line nr: 23
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);

Mutated line:
                 modulus = key.substring(exponentLen + 7, key.length + exponentLen - 7);

Untested line in RRUtils.sol:21

Mutation:
File: RRUtils.sol
Line nr: 21
Result: Lived
Original line:
assert(idx < self.length);

Mutated line:
                 assert(idx <= self.length);

Untested line in algorithms/RSASHA1Algorithm.sol:24

Mutation:
File: algorithms/RSASHA1Algorithm.sol
Line nr: 24
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);

Mutated line:
                 modulus = key.substring(exponentLen + 7, key.length - exponentLen + 7);

Untested line in algorithms/RSASHA1Algorithm.sol:24

Mutation:
File: algorithms/RSASHA1Algorithm.sol
Line nr: 24
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);

Mutated line:
                 modulus = key.substring(exponentLen - 7, key.length - exponentLen - 7);

Untested line in Migrations.sol:7

Mutation:
File: Migrations.sol
Line nr: 7
Result: Lived
Original line:
if (msg.sender == owner)

Mutated line:
             if (msg.sender != owner)

Untested line in RRUtils.sol:243

Mutation:
File: RRUtils.sol
Line nr: 243
Result: Lived
Original line:
require(nextLength <= 32);

Mutated line:
             require(nextLength < 32);

Untested line in RRUtils.sol:246

Mutation:
File: RRUtils.sol
Line nr: 246
Result: Lived
Original line:
offset += nextLength;

Mutated line:
             offset -= nextLength;

Untested line in RRUtils.sol:215

Mutation:
File: RRUtils.sol
Line nr: 215
Result: Lived
Original line:
self.digest = data.substring(offset + DS_DIGEST, length - DS_DIGEST);

Mutated line:
             self.digest = data.substring(offset + DS_DIGEST, length + DS_DIGEST);

Untested line in BytesUtils.sol:263

Mutation:
File: BytesUtils.sol
Line nr: 263
Result: Lived
Original line:
for(uint i = 0; i < len; i++) {

Mutated line:
             for(uint i = 0; i <= len; i++) {

Untested line in RRUtils.sol:235

Mutation:
File: RRUtils.sol
Line nr: 235
Result: Lived
Original line:
self.hashAlgorithm = data.readUint8(offset + NSEC3_HASH_ALGORITHM);

Mutated line:
             self.hashAlgorithm = data.readUint8(offset - NSEC3_HASH_ALGORITHM);

Untested line in algorithms/RSASHA256Algorithm.sol:23

Mutation:
File: algorithms/RSASHA256Algorithm.sol
Line nr: 23
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);

Mutated line:
                 modulus = key.substring(exponentLen + 7, key.length - exponentLen + 7);

Untested line in RRUtils.sol:193

Mutation:
File: RRUtils.sol
Line nr: 193
Result: Lived
Original line:
self.flags = data.readUint16(offset + DNSKEY_FLAGS);

Mutated line:
             self.flags = data.readUint16(offset - DNSKEY_FLAGS);

Untested line in BytesUtils.sol:199

Mutation:
File: BytesUtils.sol
Line nr: 199
Result: Lived
Original line:
require(idx + len <= self.length);

Mutated line:
             require(idx + len < self.length);

Untested line in RRUtils.sol:273

Mutation:
File: RRUtils.sol
Line nr: 273
Result: Lived
Original line:
if (len <= windowByte) {

Mutated line:
                     if (len < windowByte) {

Solidity v0.4.23

I have noticed various errors which can occur throughout the dnssec repo. Having an error message with revert / require / assert may be fairly beneficial here. Hence I would propose an upgrade to solidity v0.4.23

Untested line in RRUtils.sol:212

Mutation:
File: RRUtils.sol
Line nr: 212
Result: Lived
Original line:
self.keytag = data.readUint16(offset + DS_KEY_TAG);

Mutated line:
             self.keytag = data.readUint16(offset - DS_KEY_TAG);

Travis tests are failing

Currently travis tests are failing because the test assumes that tx.receipt.status to retun 0x0 when the transaction reverted while ganache raises exception.

async function verifyFailedSubmission(instance, name, data, sig) {
  var name = dns.hexEncodeName(name);
  var tx = await instance.submitRRSet(1, name, data, sig);
  assert.equal(tx.receipt.status, "0x0");
  return tx;
}

The potential solutions are

  1. Wait until Ganache implements correct behavior
  2. Catch all reverts and test that certain state did not check.
  3. Anything else?

Untested line in algorithms/RSASHA256Algorithm.sol:23

Mutation:
File: algorithms/RSASHA256Algorithm.sol
Line nr: 23
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);

Mutated line:
                 modulus = key.substring(exponentLen - 7, key.length - exponentLen - 7);

Untested line in BytesUtils.sol:68

Mutation:
File: BytesUtils.sol
Line nr: 68
Result: Lived
Original line:
mask = ~(2 ** (8 * (32 - shortest + idx)) - 1);

Mutated line:
                         mask = ~(2 ** (8 * (32 - shortest - idx)) - 1);

Untested line in Migrations.sol:15

Mutation:
File: Migrations.sol
Line nr: 15
Result: Lived
Original line:
function setCompleted(uint completed) public restricted {

Mutated line:
         function setCompleted(uint completed) public  {

Untested line in RRUtils.sol:241

Mutation:
File: RRUtils.sol
Line nr: 241
Result: Lived
Original line:
offset += saltLength;

Mutated line:
             offset -= saltLength;

No artifacts in git repo because no build file

Cannot migrate imported contracts from this npm module because Truffle artifacts are not included.

I think it would be a good idea to remove build/ folder from .gitignore and add it to the repo.

Untested line in Migrations.sol:7

Mutation:
File: Migrations.sol
Line nr: 7
Result: Lived
Original line:
if (msg.sender == owner)

Mutated line:
             if (msg.sender != owner)

Untested line in algorithms/RSASHA1Algorithm.sol:24

Mutation:
File: algorithms/RSASHA1Algorithm.sol
Line nr: 24
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);

Mutated line:
                 modulus = key.substring(exponentLen + 7, key.length + exponentLen - 7);

Untested line in BytesUtils.sol:267

Mutation:
File: BytesUtils.sol
Line nr: 267
Result: Lived
Original line:
require(decoded <= 0x20);

Mutated line:
                 require(decoded < 0x20);

Untested line in BytesUtils.sol:265

Mutation:
File: BytesUtils.sol
Line nr: 265
Result: Lived
Original line:
require(char >= 0x30 && char <= 0x7A);

Mutated line:
                 require(char >= 0x30 && char < 0x7A);

Untested line in Migrations.sol:19

Mutation:
File: Migrations.sol
Line nr: 19
Result: Lived
Original line:
function upgrade(address newAddress) public restricted {

Mutated line:
         function upgrade(address newAddress) public  {

Truffle tests are failing

Truffle v4.1.14 (core: 4.1.14)
Solidity v0.4.24 (solc-js)

  69 passing (33s)
  1 failing

  1) Contract: DNSSEC
       should accept real DNSSEC records:
     Error: VM Exception while processing transaction: revert
      at Object.InvalidResponse (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/errors.js:38:1)
      at /usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:86:1
      at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:134:1
      at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
      at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
      at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
      at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
      at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
      at endReadableNT (_stream_readable.js:1064:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickCallback (internal/process/next_tick.js:180:9)

Untested line in RRUtils.sol:313

Mutation:
File: RRUtils.sol
Line nr: 313
Result: Lived
Original line:
while (counts > 0 && !self.equals(off, other, otheroff)) {

Mutated line:
             while (counts >= 0 && !self.equals(off, other, otheroff)) {

Add support to DNSSEC algorithm 13

Domains using cloudflare dns are only allowed to use ECDSA (which they argue is better).
Would be nice if dnssec-oracle supported Algorithm 13, ECDSA, so we can also use our domains hosted on cloudflare.

Untested line in BytesUtils.sol:55

Mutation:
File: BytesUtils.sol
Line nr: 55
Result: Lived
Original line:
for (uint idx = 0; idx < shortest; idx += 32) {

Mutated line:
             for (uint idx = 0; idx < shortest; idx -= 32) {

Untested line in BytesUtils.sol:199

Mutation:
File: BytesUtils.sol
Line nr: 199
Result: Lived
Original line:
require(idx + len <= self.length);

Mutated line:
             require(idx - len <= self.length);

Untested line in RRUtils.sol:51

Mutation:
File: RRUtils.sol
Line nr: 51
Result: Lived
Original line:
assert(offset < self.length);

Mutated line:
                 assert(offset <= self.length);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.