summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/cert.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2017-08-27 23:51:14 -0700
committerelijah <elijah@riseup.net>2017-08-27 23:51:14 -0700
commit437f28b2cbfedfc7d119dcf4e228c5626bb8a152 (patch)
tree0d4dfbafc157a761ff94a7f176f039d4adda5f3f /lib/leap_cli/commands/cert.rb
parent804e022221bfb0b5200282e556d75e601271dac5 (diff)
bugfix: fix `leap test init`
Diffstat (limited to 'lib/leap_cli/commands/cert.rb')
-rw-r--r--lib/leap_cli/commands/cert.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/leap_cli/commands/cert.rb b/lib/leap_cli/commands/cert.rb
index 81f45eb5..68fa9444 100644
--- a/lib/leap_cli/commands/cert.rb
+++ b/lib/leap_cli/commands/cert.rb
@@ -102,13 +102,13 @@ module LeapCli; module Commands
def generate_test_client_cert(prefix=nil)
require 'leap_cli/x509'
cert = CertificateAuthority::Certificate.new
- cert.serial_number.number = cert_serial_number(provider.domain)
- cert.subject.common_name = [prefix, random_common_name(provider.domain)].join
+ cert.serial_number.number = X509.cert_serial_number(provider.domain)
+ cert.subject.common_name = [prefix, X509.random_common_name(provider.domain)].join
cert.not_before = X509.yesterday
cert.not_after = X509.yesterday.advance(:years => 1)
cert.key_material.generate_key(1024) # just for testing, remember!
- cert.parent = client_ca_root
- cert.sign! client_test_signing_profile
+ cert.parent = X509.client_ca_root
+ cert.sign! X509.client_test_signing_profile
yield cert.key_material.private_key.to_pem, cert.to_pem
end