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: utils.rb
    path of file: ./repos/truffleruby/test/mri/tests/openssl
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
begin
  require "openssl"

  # Disable FIPS mode for tests for installations
  # where FIP
    
  def get_subject_key_id(cert, hex: true)
    asn1_cert = OpenSSL::ASN1.decode(cert)
    tbscert   = asn1_cert.value[0]
    pkinfo    = tbscert.value[6]
    publickey = pkinfo.value[1]
    pkvalue   = publickey.value
    digest = OpenSSL::Digest.digest('SHA1', pkvalue)
    if hex
      digest.unpack("H2"*20).join(":").upcase
    else
      digest
    end