diff options
author | Miklos Fazekas <mfazekas@szemafor.com> | 2018-03-11 06:34:57 +0100 |
---|---|---|
committer | Miklos Fazekas <mfazekas@szemafor.com> | 2018-03-11 06:45:56 +0100 |
commit | 17aea41081bd0c96852a4a1c1fc26f875331b3b3 (patch) | |
tree | f0d155401df1909e499a5a8d6482181d5e16931e /Rakefile | |
parent | cfb3ac692af643cc7faa30ba3d9c3dd4caa14e9f (diff) | |
download | net-ssh-17aea41081bd0c96852a4a1c1fc26f875331b3b3.tar.gz |
Updated public certv5.0.0.beta1
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -43,6 +43,20 @@ RDoc::Task.new do |rdoc| } end +namespace :cert do +desc "Update public cert from private - only run if public is expired" +task :update_public_when_expired do + require 'openssl' + require 'time' + raw = File.read "net-ssh-public_cert.pem" + certificate = OpenSSL::X509::Certificate.new raw + raise Exception, "Not yet expired: #{certificate.not_after}" unless certificate.not_after < Time.now + sh "gem cert --build netssh@solutious.com --days 365*5 --private-key /mnt/gem/net-ssh-private_key.pem" + sh "mv gem-public_cert.pem net-ssh-public_cert.pem" + sh "gem cert --add net-ssh-public_cert.pem" +end +end + namespace :rdoc do desc "Update gh-pages branch" task :publish do |