Skip to content

Commit 4a94bd1

Browse files
committed
read String (binary) bytes instead of going through as Java chars
1 parent d7968d9 commit 4a94bd1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/openssl/pkcs12.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ def initialize(str = nil, password = '')
2828
@der = str
2929
end
3030

31-
p12_input_stream = java.io.StringBufferInputStream.new(@der)
32-
3331
store = SecurityHelper.getKeyStore("PKCS12")
34-
store.load(p12_input_stream, password.to_java.to_char_array)
32+
store.load(java.io.ByteArrayInputStream.new(@der.to_java_bytes), password.to_java.to_char_array)
3533

3634
aliases = store.aliases
3735
aliases.each do |alias_name|

0 commit comments

Comments
 (0)