lib/yoti/ssl.rb in yoti-1.1.0 vs lib/yoti/ssl.rb in yoti-1.2.0

- old
+ new

@@ -24,11 +24,11 @@ def decrypt_token(encrypted_connect_token) raise SslError, 'Encrypted token cannot be nil.' unless encrypted_connect_token begin private_key.private_decrypt(Base64.urlsafe_decode64(encrypted_connect_token)) - rescue => error + rescue StandardError => error raise SslError, "Could not decrypt token. #{error}" end end # Extracts the public key from pem key, converts it to a DER base 64 encoded value @@ -61,10 +61,10 @@ private def private_key @private_key ||= OpenSSL::PKey::RSA.new(pem) - rescue => error + rescue StandardError => error raise SslError, "The secure key is invalid. #{error}" end end end end