spec/dummy/app/controllers/api/api_controller.rb in aaf-gumboot-1.0.0.pre.alpha.2 vs spec/dummy/app/controllers/api/api_controller.rb in aaf-gumboot-1.1.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'openssl'
module API
class APIController < ActionController::Base
Forbidden = Class.new(StandardError)
@@ -43,10 +45,9 @@
components[0..1]
end
]
x509_dn_hash['CN'] || raise(Unauthorized, 'Subject CN invalid')
-
rescue OpenSSL::X509::NameError
raise(Unauthorized, 'Subject DN invalid')
end
def x509_dn