mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Calculate md5 differently
This commit is contained in:
parent
ead97b8382
commit
fecb6b40fc
3 changed files with 9 additions and 7 deletions
|
@ -45,8 +45,12 @@ class ApiUser < User
|
|||
registrar.messages.queued
|
||||
end
|
||||
|
||||
def registrar_pki_ok?(crt)
|
||||
certificates.registrar.exists?(crt: crt)
|
||||
def registrar_pki_ok?(crt, cn)
|
||||
cert = OpenSSL::X509::Certificate.new(crt)
|
||||
md5 = OpenSSL::Digest::MD5.new(cert.to_der).to_s
|
||||
logger.error(md5)
|
||||
logger.error(cn)
|
||||
certificates.registrar.exists?(md5: md5, cn: cn)
|
||||
end
|
||||
|
||||
def api_pki_ok?(crt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue