Skip to content

proposal: x/crypto/ssh/knownhosts: Add LineWithMarker function and MarkerCert and MarkerRevoked constants #70962

@arianvp

Description

@arianvp

Proposal Details

The Line function doesn't allow you to write known host lines with the optional @cert-authority and @revoked markers, I suggest we introduce a new function:

const MarkerCert = "@cert-authority"
const MarkerRevoked = "@revoked"

func LineWithMarker(marker string, addresses []string, key ssh.PublicKey) string {
	if marker != "" {
		return marker + " " + Line(addresses, key)
	} else {
		return Line(addresses, key)
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProposalProposal-CryptoProposal related to crypto packages or other security issues

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions