Code Monkey home page Code Monkey logo

Comments (5)

ircecho avatar ircecho commented on August 28, 2024 3

This problem is only present in the later OpenSSL versions, mine is

OpenSSL 1.1.0e  16 Feb 2017

from transcrypt.

dfee avatar dfee commented on August 28, 2024

Specifically, here is the update that needs to be made:

validate_cipher() {
	local supported=$(openssl list -cipher-commands | tr -s ' ' '\n' | grep --line-regexp "$cipher")
	if [[ ! $supported ]]; then
		if [[ $interactive ]]; then
			printf '"%s" is not a valid cipher; choose one of the following:\n\n' "$cipher"
			openssl list -cipher-commands | column -c 80
			printf '\n'
			unset cipher
		else
			die 1 '"%s" is not a valid cipher; see `openssl list -cipher-commands`' "$cipher"
		fi
	fi
}

There are two changes:

  1. openssl list -cipher-commands as mentioned above
  2. openssl list -cipher-commands | tr -s ' ' '\n' | grep --line-regexp "$cipher" note the tr -s to turn the tabular data into a single column list.

If my bash-fu were better, I'd issue a PR, but I can't quite figure out how to do a conditional on the semver of openssl. i.e. openssl version | awk '{print $2}' returns the version... and we know that 1.1 is where the change broke, but I'm not quite there in bash land for parsing major / minor / patch and doing the comparison. Hopefully this is a good starting point for the author.

For now, I'm just adding it to my repo's /scripts dir.

from transcrypt.

jackrh avatar jackrh commented on August 28, 2024

This issue popped up for me when I tried to decrypt a new cloned repository using the provided transcrypt command from the original repo. Applying dfee's validate_cipher update fixed it for me. Using openssl 1.1.0f

from transcrypt.

cdimitroulas avatar cdimitroulas commented on August 28, 2024

I have made a PR from @thomas-hilaire's fork which has the fix for this - not sure why he didn't make it himself.

from transcrypt.

elasticdog avatar elasticdog commented on August 28, 2024

This has been resolved by #48 and a7e8aef. I'll be cutting a new release shortly, but feel free to try out the code in the master branch.

from transcrypt.

Related Issues (20)

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.