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

CSR sample doesn't work out of the box #419

Closed
toabi opened this issue Feb 23, 2021 · 2 comments
Closed

CSR sample doesn't work out of the box #419

toabi opened this issue Feb 23, 2021 · 2 comments

Comments

@toabi
Copy link

toabi commented Feb 23, 2021

req.sign(keypair, Digest.new('MD5'))

This fails with not finding Digest.

But it works when writing OpenSSL::Digest.new("MD5"). But I never used ruby before.

@rhenium
Copy link
Member

rhenium commented Feb 25, 2021

Good catch. The use of include OpenSSL in those examples is problematic.

rhenium added a commit to rhenium/ruby that referenced this issue Mar 16, 2021
It is not a common practice and should not be done since it causes name
clash: for example, Digest and Random are provided by other standard
libraries of Ruby.

Fixes: ruby/openssl#419

ruby/openssl@6a6444984b
@toabi
Copy link
Author

toabi commented Mar 24, 2023

You wouldn't believe it but the existence of this sample and the fix that it's working now saved some part on infrastructure from collapse :D Because with this library one can create CA certificates where the country has three letters. 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants