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