Skip to content

"data is not a valid scrypt-encrypted block" error is not triggered on xenial #164

@tamirms

Description

@tamirms

These 2 tests fail on xenial:

  1) Scrypt Node Module Tests Scrypt Hash Function Verify Hash Synchronous functionality with incorrect arguments Will throw an Error if KDF buffer is not a valid scrypt-encrypted block:
     AssertionError: expected [Error] to match /^Error: data is not a valid scrypt-encrypted block$/
      at context.<anonymous> (tests/scrypt-tests.js:493:17)

  2) Scrypt Node Module Tests Scrypt Hash Function Verify Hash Asynchronous functionality with incorrect arguments Will throw an Error if KDF buffer is not a valid scrypt-encrypted block:
     AssertionError: expected [Error] to match /^Error: data is not a valid scrypt-encrypted block$/
      at context.<anonymous> (tests/scrypt-tests.js:558:17)

To reproduce you can build and run this docker image:

FROM ubuntu:16.04

# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN apt-get update \
    && apt-get install -y curl python build-essential git \
    && apt-get -y autoclean

# nvm environment variables
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 8.9.3

# install nvm
# https://github.com/creationix/nvm#install-script
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash

# install node and npm
RUN source $NVM_DIR/nvm.sh \
    && nvm install $NODE_VERSION \
    && nvm alias default $NODE_VERSION \
    && nvm use default

# add node and npm to path so the commands are available
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

RUN npm install -g node-gyp

RUN git clone https://github.com/barrysteyn/node-scrypt.git
WORKDIR /node-scrypt

RUN npm install
RUN node-gyp configure build

CMD npm test

If you change the base image to ubuntu:14.04 you will find that the tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions