You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_ca.rb
    path of file: ./repos/puppet/spec/lib/puppet
    
    the code of the file until where you have to start completion: module Puppet
  class TestCa

    CERT_VALID_FROM = Time.at(0).freeze # 1969-12-31 16:00:00 -0800
    CERT_VALID_UNTIL = (Time.now + (10 * 365 * 24 * 60 * 60)).freeze # 10 years 
    
    def build_cert(name, issuer, opts = {})
      key = if opts[:key_type] == :ec
              key = OpenSSL::PKey::EC.generate('prime256v1')
            elsif opts[:reuse_key]
              key = opts[:reuse_key]
            else
              key = OpenSSL::PKey::RSA.new(2048)
            end