feat: Implement new certificate generation service

- Refactor certificate generation into a dedicated service object
- Add Base64 encoding for p12 binary data storage
- Implement serial number generation and storage
- Remove deprecated certificate generation code
- Simplify certificate status checks
- Update certificate controller to use new generator
- Add proper password handling for p12 containers

The main changes include:
- Moving certificate generation logic to CertificateGenerator service
- Proper handling of binary data encoding
- Implementing serial number tracking for future CRL support
- Removing old certificate generation and validation code
- Simplifying the certificate lifecycle management

This commit provides a more maintainable and robust certificate
generation system while preparing for future CRL implementation.
This commit is contained in:
oleghasjanov 2025-03-13 15:01:17 +02:00
parent d0f247c61c
commit 0925fa4d4b
8 changed files with 104 additions and 453 deletions

View file

@ -0,0 +1,7 @@
class AddSerialAndRevokeStatesToCertificates < ActiveRecord::Migration[6.1]
def change
add_column :certificates, :serial, :string, null: true
add_column :certificates, :revoked_at, :datetime, null: true
add_column :certificates, :revoked_reason, :integer, null: true
end
end