Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #6477: Create a script to sign files using openssl on unix #634

Conversation

peckpeck
Copy link
Member

@peckpeck peckpeck commented Apr 8, 2015

PR replaced by #644

FILE="$1"
if [ ! -e "${FILE}" ]
then
echo "Cannot sign: The file ${FILE} doesn't exist"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing an "ERROR: " prefix here

@Kegeruneku
Copy link

I'd rather name this utility signature and not signature.sh :) the suffix is not desirable here nor needed !

Let the kernel use its shebang magic to handle the rest :p

else
echo "ERROR: openssl binary is missing !"
exit 1
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use:

if ! type openssl 2> /dev/null
then
  echo "ERROR: openssl binary is missing !"
  exit 1
fi

You'd avoid a useless "true"

@peckpeck
Copy link
Member Author

peckpeck commented Apr 9, 2015

There will be a signature.cmd for windows too, the .sh was here to explicitly distinguish which one will be for wich environment

@peckpeck peckpeck force-pushed the dev_6477/create_a_script_to_sign_files_using_openssl_on_unix branch from a0896a9 to 4c133a0 Compare April 9, 2015 14:50
@peckpeck
Copy link
Member Author

peckpeck commented Apr 9, 2015

PR updated

@Kegeruneku
Copy link

That's a good reason !

@Kegeruneku
Copy link

Would you be kind enough to retarget this PR for 3.1 ?

@Kegeruneku
Copy link

Also this script should be able to try to use Rudder's bundled OpenSSL version if no system one is available (/opt/rudder/bin/openssl)

@peckpeck peckpeck force-pushed the dev_6477/create_a_script_to_sign_files_using_openssl_on_unix branch from 4c133a0 to 2b00078 Compare April 28, 2015 12:08
@peckpeck peckpeck closed this Apr 28, 2015
@peckpeck peckpeck reopened this Apr 28, 2015
@peckpeck
Copy link
Member Author

PR replaced by #644

@peckpeck peckpeck closed this Apr 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants