1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[Brightbox] Add new SSL cert metadata attributes

Now adding `valid_from` and `issuer` to model
This commit is contained in:
Paul Thornthwaite 2013-11-08 16:14:38 +00:00
parent d484e45833
commit df83a84d35

View file

@ -23,7 +23,9 @@ module Fog
attribute :certificate_private_key
# These SSL attributes act only as getters for metadata
attribute :certificate_valid_from
attribute :certificate_expires_at
attribute :certificate_issuer
attribute :certificate_subject
# Times
@ -80,10 +82,14 @@ module Fog
# @private
def certificate=(cert_metadata)
if cert_metadata
attributes[:certificate_valid_from] = time_or_original(cert_metadata["valid_from"])
attributes[:certificate_expires_at] = time_or_original(cert_metadata["expires_at"])
attributes[:certificate_issuer] = cert_metadata["issuer"]
attributes[:certificate_subject] = cert_metadata["subject"]
else
attributes[:certificate_valid_from] = nil
attributes[:certificate_expires_at] = nil
attributes[:certificate_issuer] = nil
attributes[:certificate_subject] = nil
end
end