class Net::SSH::HostKeyEntries::CertAuthority

@cert-authority entry

def initialize(key, comment: nil)

def initialize(key, comment: nil)
  @key = key
  @comment = comment
end

def matches_key?(server_key)

def matches_key?(server_key)
  if ssh_types.include?(server_key.ssh_type)
    server_key.signature_valid? && (server_key.signature_key.to_blob == @key.to_blob)
  else
    false
  end
end

def ssh_types

def ssh_types
  %w[
    ecdsa-sha2-nistp256-cert-v01@openssh.com
    ecdsa-sha2-nistp384-cert-v01@openssh.com
    ecdsa-sha2-nistp521-cert-v01@openssh.com
    ssh-ed25519-cert-v01@openssh.com
    ssh-rsa-cert-v01@openssh.com
    ssh-rsa-cert-v00@openssh.com
  ]
end