Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Mar 26, 2015
1 parent f21fdc3 commit 5d65e2c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions spec/support/create_certs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'fileutils'
require 'certificate_authority'

FileUtils.mkdir_p(certs_dir)
Expand All @@ -19,8 +18,8 @@
ca_cert_path = File.join(certs_dir, 'ca.crt')
ca_key_path = File.join(certs_dir, 'ca.key')

File.write ca_cert_path, ca.to_pem
File.write ca_key_path, ca.key_material.private_key.to_pem
File.open(ca_cert_path, 'w') { |io| io << ca.to_pem }
File.open(ca_key_path, 'w') { |io| io << ca.key_material.private_key.to_pem }

#
# Server Certificate
Expand All @@ -36,8 +35,8 @@
server_cert_path = File.join(certs_dir, 'server.crt')
server_key_path = File.join(certs_dir, 'server.key')

File.write server_cert_path, server_cert.to_pem
File.write server_key_path, server_cert.key_material.private_key.to_pem
File.open(server_cert_path, 'w') { |io| io << server_cert.to_pem }
File.open(server_key_path, 'w') { |io| io << server_cert.key_material.private_key.to_pem }

#
# Client Certificate
Expand All @@ -53,5 +52,5 @@
client_cert_path = File.join(certs_dir, 'client.crt')
client_key_path = File.join(certs_dir, 'client.key')

File.write client_cert_path, client_cert.to_pem
File.write client_key_path, client_cert.key_material.private_key.to_pem
File.open(client_cert_path, 'w') { |io| io << client_cert.to_pem }
File.open(client_key_path, 'w') { |io| io << client_cert.key_material.private_key.to_pem }

0 comments on commit 5d65e2c

Please sign in to comment.