From 27e68ffb971eeafed64c2620b835d290aeab41aa Mon Sep 17 00:00:00 2001 From: Patrick Hogan Date: Fri, 28 Sep 2018 17:52:45 -0400 Subject: [PATCH] Changed cert for new release and added checksum --- Rakefile | 12 ++++++++++++ certs/pbhogan.pem | 26 ++++++++++++++++++++++++++ checksum/scrypt-3.0.6.gem.sha512 | 1 + scrypt.gemspec | 3 ++- 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 certs/pbhogan.pem create mode 100644 checksum/scrypt-3.0.6.gem.sha512 diff --git a/Rakefile b/Rakefile index fe6ef03..371d7b1 100644 --- a/Rakefile +++ b/Rakefile @@ -9,6 +9,9 @@ require 'rspec/core/rake_task' require 'ffi' require 'ffi-compiler/compile_task' +require 'digest/sha2' +require './lib/scrypt/version' + require 'rubygems' require 'rubygems/package_task' @@ -21,6 +24,14 @@ task :spec do RSpec::Core::RakeTask.new end +desc 'generate checksum' +task :checksum do + built_gem_path = "pkg/scrypt-#{SCrypt::VERSION}.gem" + checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path)) + checksum_path = "checksum/scrypt-#{SCrypt::VERSION}.gem.sha512" + File.open(checksum_path, 'w' ) {|f| f.write(checksum) } +end + desc 'FFI compiler' namespace 'ffi-compiler' do FFI::Compiler::CompileTask.new('ext/scrypt/scrypt_ext') do |t| @@ -69,3 +80,4 @@ Gem::PackageTask.new(gem_spec) do |pkg| pkg.need_tar = true pkg.package_dir = 'pkg' end + diff --git a/certs/pbhogan.pem b/certs/pbhogan.pem new file mode 100644 index 0000000..7a28db7 --- /dev/null +++ b/certs/pbhogan.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEbDCCAtSgAwIBAgIBATANBgkqhkiG9w0BAQsFADA+MRAwDgYDVQQDDAdwYmhv +Z2FuMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNjb20w +HhcNMTgwOTI4MjEzNTU1WhcNMTkwOTI4MjEzNTU1WjA+MRA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j8kyZdy2pI7YoHiiw3cixmOXk1MyVmIieu/cfnuiWWSb +kk3+vPK0Eobm83mduWg2Y0r8CTm+G+bbj1dQdkW8KMQSVZW44K9HDc/2j2yZY9sR +XPUR8cQwesYTGVjjeEJcsPJMOsiTEMC3Sp/vC3RM53aRLuGivtvAuI46dBWZcbe+ +FcO692GiKUmAd9b5WSvSgKBKzrnWGSzvH2MiL9RUa5BaVleB5uDdr6s+H6HQDyRk +zJEymUkjdHk3cmNgIQAhdQasTM1qSCToMw2dBwjlVKc= +-----END CERTIFICATE----- diff --git a/checksum/scrypt-3.0.6.gem.sha512 b/checksum/scrypt-3.0.6.gem.sha512 new file mode 100644 index 0000000..12e4385 --- /dev/null +++ b/checksum/scrypt-3.0.6.gem.sha512 @@ -0,0 +1 @@ +fb1b89bddfd5fa440994aad7f3edc6cce588c41018bf60ba82eab927863e243025c2e25094be2dfefdbe21a022dec62bdd072284ff83e472071791ff69bcb949 \ No newline at end of file diff --git a/scrypt.gemspec b/scrypt.gemspec index abe7fe3..35d3a21 100644 --- a/scrypt.gemspec +++ b/scrypt.gemspec @@ -8,7 +8,7 @@ Gem::Specification.new do |s| s.authors = ["Patrick Hogan", "Stephen von Takach", "Rene van Paassen" ] s.email = ["pbhogan@gmail.com", "steve@advancedcontrol.com.au", "rene.vanpaassen@gmail.com" ] - s.cert_chain = ['certs/stakach.pem'] + s.cert_chain = ['certs/pbhogan.pem'] s.license = 'BSD-3-Clause' s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/ s.homepage = "https://github.com/pbhogan/scrypt" @@ -34,3 +34,4 @@ Gem::Specification.new do |s| s.test_files = Dir.glob("spec/**/*") s.require_paths = ["lib"] end +