Project

General

Profile

Backport #5233

OpenSSL::SSL::SSLSocket has problems with encodings other than "ascii"

Added by niklasb (Niklas Baumstark) almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:39120]

Description

The attached script shows the issue. It expects a combined cert/private key in the file server.pem under the current directory (also attached).
Under Ruby 1.9.2p290, the script prints "str.size is 50848 (expecting 100000)".
As a workaround the string encoding can be forced to "ascii" before the write.


Files

openssl_write_failure.rb (892 Bytes) openssl_write_failure.rb A sample script showing the problem niklasb (Niklas Baumstark), 08/26/2011 08:45 PM
server.pem (1.62 KB) server.pem A self-signed certificate file for executing the script niklasb (Niklas Baumstark), 08/26/2011 08:45 PM

Also available in: Atom PDF