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: smime_helper.rb
    path of file: ./repos/gitlabhq/spec/support/helpers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module SmimeHelper
  INFINITE_EXPIRY = 1000.years
  SHORT_EXPIRY = 30.minutes

  def generate_root
    issue(cn: 'RootCA', signed_by: nil, expires_in: INFINITE_EXPIRY, certificate_autho
    
  def issue(signed_by:, expires_in:, certificate_authority:, email_address: 'test@example.com', cn: nil)
    key = OpenSSL::PKey::RSA.new(4096)
    public_key = key.public_key

    subject = if certificate_authority
                OpenSSL::X509::Name.parse("/CN=#{cn}")
              else
                OpenSSL::X509::Name.parse("/CN=#{email_address}")
              end