Skip to content
Browse files

Fixed paths to the key files to be relative to the Rails application …

…root
  • Loading branch information...
1 parent 958df99 commit 4baacffbecf7a7250cb2925f01f49e32b19e5198 Gleb Dolgich committed Jun 15, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 ruby/licensekey.rb
View
4 ruby/licensekey.rb
@@ -18,7 +18,7 @@ def make_license_source(product_code, name)
# using quantity here, but you're free to do it.
def make_license(product_code, name, copies)
sign_dss1 = OpenSSL::Digest::DSS1.new
- priv = OpenSSL::PKey::DSA.new(File.read("dsapriv512.pem"))
+ priv = OpenSSL::PKey::DSA.new(File.read("lib/dsapriv512.pem"))
b32 = Base32.encode(priv.sign(sign_dss1, make_license_source(product_code, name)))
# Replace Os with 8s and Is with 9s
# See http://members.shaw.ca/akochoi-old/blog/2004/11-07/index.html
@@ -30,7 +30,7 @@ def make_license(product_code, name, copies)
def verify_license(product_code, name, copies, lic)
verify_dss1 = OpenSSL::Digest::DSS1.new
- pub = OpenSSL::PKey::DSA.new(File.read("dsapub512.pem"))
+ pub = OpenSSL::PKey::DSA.new(File.read("lib/dsapub512.pem"))
lic.delete!("-")
lic.gsub!(/9/, 'I')
lic.gsub!(/8/, 'O')

0 comments on commit 4baacff

Please sign in to comment.
Something went wrong with that request. Please try again.