Sha256: 2cb7de9d318b13910508f7b975d42013a26a9db410686e525fe12392a3dc1ee4

Contents?: true

Size: 638 Bytes

Versions: 37

Compression:

Stored size: 638 Bytes

Contents

# encoding: utf-8
require "open3"
OPEN_SSL_TOPK8 = "openssl pkcs8 -nocrypt -topk8 -inform PEM -outform PEM"

# Netty only accepts PKC8 format for the private key, which in the real world is fine
# because any newer version of OpenSSL with use that format by default.
#
# But in Ruby or Jruby-OpenSSL, the private key will be generates in PKCS7, which netty doesn't support.
# Converting the format is a bit of hassle to do in code so In this case its just easier to use the `openssl` binary to do the work.
#
#
def convert_to_pkcs8(key)
  out, e, s = Open3.capture3(OPEN_SSL_TOPK8, :stdin_data => key.to_s)
  raise e if e != ""
  out
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
logstash-input-beats-3.1.32-java spec/support/helpers.rb
logstash-input-beats-3.1.31-java spec/support/helpers.rb
logstash-input-beats-3.1.30-java spec/support/helpers.rb
logstash-input-beats-3.1.29-java spec/support/helpers.rb
logstash-input-beats-3.1.28-java spec/support/helpers.rb
logstash-input-beats-3.1.27-java spec/support/helpers.rb
logstash-input-beats-3.1.26-java spec/support/helpers.rb
logstash-input-beats-3.1.25-java spec/support/helpers.rb
logstash-input-beats-3.1.24-java spec/support/helpers.rb
logstash-input-beats-5.0.1-java spec/support/helpers.rb
logstash-input-beats-5.0.0-java spec/support/helpers.rb
logstash-input-beats-3.1.23-java spec/support/helpers.rb
logstash-input-beats-3.1.22-java spec/support/helpers.rb
logstash-input-beats-4.0.5-java spec/support/helpers.rb
logstash-input-beats-3.1.21-java spec/support/helpers.rb
logstash-input-beats-3.1.20-java spec/support/helpers.rb
logstash-input-beats-4.0.4-java spec/support/helpers.rb
logstash-input-beats-3.1.19-java spec/support/helpers.rb
logstash-input-beats-4.0.3-java spec/support/helpers.rb
logstash-input-beats-3.1.18-java spec/support/helpers.rb