lib/esteid/validation.rb in esteid-1.0.4 vs lib/esteid/validation.rb in esteid-1.0.5
- old
+ new
@@ -2,11 +2,11 @@
module EstEID
class Validation
attr_reader :eid_public_key
- STATUSES = {
+ ERROR_STATUSES = {
'REVOKED' => 'cert_revoked',
'UNKNOWN' => 'cert_unknown',
'EXPIRED' => 'cert_expired',
'SUSPENDED' => 'cert_suspended',
'100' => '100',
@@ -51,12 +51,11 @@
@client ||= ::Savon.client(
endpoint: EstEID.config.digidoc_endpoint_url,
namespace: "http://www.sk.ee/DigiDocService/DigiDocService_2_3.wsdl",
raise_errors: false,
open_timeout: 10,
- ssl_version: :TLSv1,
- ssl_verify_mode: :none
+ ssl_version: :TLSv1
)
end
def response
@response ||= client.call("CheckCertificate") do |locals|
@@ -73,11 +72,11 @@
end
def error_status(status)
return if valid?
- if STATUSES.include?(status)
- STATUSES[status]
+ if ERROR_STATUSES.include?(status)
+ ERROR_STATUSES[status]
else
status
end
end
end