Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
arianvp opened this issue Dec 22, 2024 · 1 comment
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Milestone

Comments

@arianvp
Copy link

arianvp commented Dec 22, 2024

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)
	}
}
@gopherbot gopherbot added this to the Proposal milestone Dec 22, 2024
@arianvp arianvp changed the title proposal:x/crypto/ssh/knownhosts: Add LineWithMarker function and MarkerCert and MarkerRevoked constants proposal:x/crypto/ssh/knownhosts: Add LineWithMarker function and MarkerCert and MarkerRevoked constants Dec 22, 2024
@seankhliao seankhliao changed the title proposal:x/crypto/ssh/knownhosts: Add LineWithMarker function and MarkerCert and MarkerRevoked constants proposal: x/crypto/ssh/knownhosts: Add LineWithMarker function and MarkerCert and MarkerRevoked constants Dec 22, 2024
@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Dec 22, 2024
@ianlancetaylor ianlancetaylor added the Proposal-Crypto Proposal related to crypto packages or other security issues label Dec 22, 2024
@ianlancetaylor
Copy link
Member

CC @drakkan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Projects
Status: Incoming
Development

No branches or pull requests

3 participants