lib/certmeister/policy/signature_algorithm.rb in certmeister-2.3.1 vs lib/certmeister/policy/signature_algorithm.rb in certmeister-2.3.2
- old
+ new
@@ -15,22 +15,22 @@
validate_signature_algorithms(signature_algorithms)
@signature_algorithms = signature_algorithms
end
def authenticate(request)
- if not request[:pem]
- return Certmeister::Policy::Response.new(false, "missing pem")
+ if not request[:csr]
+ return Certmeister::Policy::Response.new(false, "missing csr")
else
- cert = OpenSSL::X509::Request.new(request[:pem])
+ cert = OpenSSL::X509::Request.new(request[:csr])
signature_algorithm = cert.signature_algorithm
if signature_algorithm = check_for_supported_signature_algorithm(signature_algorithm)
check_signature_algorithm_strength(signature_algorithm)
else
return Certmeister::Policy::Response.new(false, "unknown/unsupported signature algorithm (#{cert.signature_algorithm})")
end
end
rescue OpenSSL::X509::RequestError => e
- return Certmeister::Policy::Response.new(false, "invalid pem (#{e.message})")
+ return Certmeister::Policy::Response.new(false, "invalid csr (#{e.message})")
end
private
def validate_signature_algorithms(signature_algorithms)