need to fix license

This commit is contained in:
Yan
2017-12-19 14:18:41 +06:30
parent 368405451f
commit 4e616ed5eb

View File

@@ -69,8 +69,8 @@ class License
# For Local System # For Local System
def detail_with_local_file() def detail_with_local_file()
aes = MyAesCrypt.new # aes = MyAesCrypt.new
aes_key, aes_iv = aes.export_key(lookup) # aes_key, aes_iv = aes.export_key(lookup)
renewal_date_str = read_license("renewable_date") renewal_date_str = read_license("renewable_date")
# ##Check from local redis - if available load local otherwise get from remote # ##Check from local redis - if available load local otherwise get from remote
@@ -164,6 +164,7 @@ class License
File.open("config/license.yml").each do |line| File.open("config/license.yml").each do |line|
if line.include? (key) if line.include? (key)
decrypted_line_array = line.split(": ") decrypted_line_array = line.split(": ")
byebug
decrypted_line = AESCrypt.decrypt_data(decode_str(decrypted_line_array[1]), decode_str(ENV['AES_KEY']), decode_str(ENV['AES_IV']), ENV['CIPHER_TYPE']) decrypted_line = AESCrypt.decrypt_data(decode_str(decrypted_line_array[1]), decode_str(ENV['AES_KEY']), decode_str(ENV['AES_IV']), ENV['CIPHER_TYPE'])
end end
end end