Sha256: 3e5d162525cf1ca1cfca0c1ad49b4a0b7a91f469a465b1a47756a4a1de40617c

Contents?: true

Size: 404 Bytes

Versions: 16

Compression:

Stored size: 404 Bytes

Contents

# frozen_string_literal: true
require 'openssl'

test_path = File.expand_path('../../test/rubygems', __FILE__)

private_key_path = "#{test_path}/private_key.pem"

key = OpenSSL::PKey::RSA.new File.read private_key_path

cipher = OpenSSL::Cipher.new 'DES-CBC'

encrypted_key_path = "#{test_path}/encrypted_private_key.pem"

open encrypted_key_path, 'w' do |io|
  io.write key.to_pem cipher, 'Foo bar'
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rubygems-update-3.1.6 util/create_encrypted_key.rb
rubygems-update-3.1.5 util/create_encrypted_key.rb
rubygems-update-3.0.9 util/create_encrypted_key.rb
rubygems-update-3.1.4 util/create_encrypted_key.rb
rubygems-update-3.1.3 util/create_encrypted_key.rb
rubygems-update-3.0.8 util/create_encrypted_key.rb
rubygems-update-3.0.7 util/create_encrypted_key.rb
rubygems-update-3.1.2 util/create_encrypted_key.rb
rubygems-update-3.1.1 util/create_encrypted_key.rb
rubygems-update-3.1.0 util/create_encrypted_key.rb
rubygems-update-3.1.0.pre3 util/create_encrypted_key.rb
rubygems-update-3.1.0.pre2 util/create_encrypted_key.rb
rubygems-update-3.1.0.pre1 util/create_encrypted_key.rb
rubygems-update-3.0.6 util/create_encrypted_key.rb
rubygems-update-3.0.5 util/create_encrypted_key.rb
rubygems-update-3.0.4 util/create_encrypted_key.rb