lib/sepa/attribute_checks.rb
def check_keys
      return if %i(
        create_certificate
        get_bank_certificate
        get_certificate
        get_service_certificates
      ).include? command

      begin
        rsa_key signing_private_key
      rescue
        errors.add(:signing_private_key, "Invalid signing private key")
      end

      x509_certificate own_signing_certificate
    rescue
      errors.add(:own_signing_certificate, "Invalid signing certificate")
    end
# Checks that signing keys and certificates can be initialized properly.
Checks that signing keys and certificates can be initialized properly.
Checks that signing keys and certificates can be initialized properly .
def check_keys
      return if %i(
        create_certificate
        get_bank_certificate
        get_certificate
        get_service_certificates
      ).include? command
      begin
        rsa_key signing_private_key
      rescue
        errors.add(:signing_private_key, "Invalid signing private key")
      end
      x509_certificate own_signing_certificate
    rescue
      errors.add(:own_signing_certificate, "Invalid signing certificate")
    end
def check_keys return if %i( create_certificate get_bank_certificate get_certificate get_service_certificates ) . include? command begin rsa_key signing_private_key rescue errors . add ( :signing_private_key , "Invalid signing private key" ) end x509_certificate own_signing_certificate rescue errors . add ( :own_signing_certificate , "Invalid signing certificate" ) end
Checks that signing keys and certificates can be initialized properly.
Checks that signing keys and certificates can be initialized properly .