mirror of
https://github.com/internetee/registry.git
synced 2025-08-14 13:33:55 +02:00
added logs
This commit is contained in:
parent
fe90d787c2
commit
4d33898856
2 changed files with 11 additions and 0 deletions
|
@ -150,6 +150,11 @@ module Repp
|
|||
crt = request.headers['User-Certificate']
|
||||
com = request.headers['User-Certificate-CN']
|
||||
|
||||
Rails.logger.info '============== crts =============='
|
||||
Rails.logger.info crt
|
||||
Rails.logger.info com
|
||||
Rails.logger.info '============== crts =============='
|
||||
|
||||
return if @current_user.pki_ok?(crt, com, api: false)
|
||||
|
||||
render_invalid_cert_response
|
||||
|
|
|
@ -80,6 +80,12 @@ class ApiUser < User
|
|||
cert = machine_readable_certificate(crt)
|
||||
md5 = OpenSSL::Digest::MD5.new(cert.to_der).to_s
|
||||
|
||||
Rails.logger.info '============== pki_ok? =============='
|
||||
Rails.logger.info md5
|
||||
Rails.logger.info com
|
||||
Rails.logger.info origin.exists?(md5: md5, common_name: com, revoked: false)
|
||||
Rails.logger.info '============== pki_ok? =============='
|
||||
|
||||
origin.exists?(md5: md5, common_name: com, revoked: false)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue