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

Bug 1092 fix #1165

Merged
merged 3 commits into from Oct 29, 2013

Conversation

Projects
None yet
3 participants
@LarsWestergren
Copy link
Contributor

LarsWestergren commented Oct 25, 2013

Behave like MRI - allow for instance UTF8 Strings to PKCS12.create, but coerce them to ASCII_8BIT so BouncyCastle can read them correctly.

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Oct 29, 2013

See #1092.

@@ -31,6 +31,7 @@ def initialize(str = nil, password = '')
@der = file.read
file.close
else
str.force_encoding(Encoding::ASCII_8BIT) unless str.encoding == Encoding::ASCII_8BIT

This comment has been minimized.

Copy link
@BanzaiMan

BanzaiMan Oct 29, 2013

Member

Do we need unless here? Seems to me that if encoding is ASCII_8BIT already, there is no harm in forcing it. (And the code is slightly cleaner as a result.)

@LarsWestergren

This comment has been minimized.

Copy link
Contributor Author

LarsWestergren commented Oct 29, 2013

You are right. Unnecessary conditional removed.

headius added a commit that referenced this pull request Oct 29, 2013

@headius headius merged commit 8bd991d into jruby:master Oct 29, 2013

1 check passed

default The Travis CI build passed
Details
@headius

This comment has been minimized.

Copy link
Member

headius commented Oct 29, 2013

Thank you!

headius added a commit that referenced this pull request Oct 29, 2013

Merge pull request #1165 from LarsWestergren/master
Bug 1092 fix

Signed-off-by: Charles Oliver Nutter <headius@headius.com>

Conflicts:
	test/externals/ruby2.0/openssl/test_pkcs12.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.