mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 15:42:32 -05:00
add ability to use own signing cert
This commit is contained in:
1 parent
c9f39e7b1a
commit
d3a5f36555
17 files changed
+296
-78
No files matched your search
@@ -87,4 +87,19 @@ module GenerateCertificate
|
||||
|
||||
[cert, key]
|
||||
end
|
||||
|
||||
def load_pkcs(cert_data)
|
||||
cert = OpenSSL::X509::Certificate.new(cert_data['cert'])
|
||||
key = OpenSSL::PKey::RSA.new(cert_data['key'])
|
||||
sub_ca = OpenSSL::X509::Certificate.new(cert_data['sub_ca'])
|
||||
root_ca = OpenSSL::X509::Certificate.new(cert_data['root_ca'])
|
||||
|
||||
OpenSSL::PKCS12.create(
|
||||
'',
|
||||
'',
|
||||
key,
|
||||
cert,
|
||||
[sub_ca, root_ca]
|
||||
)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user