tlsutils

package
v1.4.4-alpha1202-loadi... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 33 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildP12 added in v1.2.7

func BuildP12(certBytes, keyBytes []byte, password string, ca ...[]byte) ([]byte, error)

func BuildP12ForGM

func BuildP12ForGM(certBytes, keyBytes []byte, password string, ca ...[]byte) ([]byte, error)

func CertificateRequestText

func CertificateRequestText(csr *x509.CertificateRequest) (string, error)

CertificateRequestText returns a human-readable string representation of the certificate request csr. The format is similar (but not identical) to the OpenSSL way of printing certificates.

func CertificateText

func CertificateText(cert *x509.Certificate) (string, error)

CertificateText returns a human-readable string representation of the certificate cert. The format is similar (but not identical) to the OpenSSL way of printing certificates.

func Decrypt

func Decrypt(r string, priPem []byte) ([]byte, error)

func Encrypt

func Encrypt(raw []byte, pemBytes []byte) (string, error)

func GenerateCA

func GenerateCA(opts ...CertOption) ([]byte, []byte, error)

GenerateCA 创建一个新的自签名 CA 证书和私钥。 返回 PEM 编码的证书和私钥。

func GenerateCRL

func GenerateCRL(ca, key []byte, revokingCert []byte, existedRevoked ...pkix.RevokedCertificate) ([]byte, error)

func GenerateCRLWithExistedList

func GenerateCRLWithExistedList(ca, key []byte, existedRevoked ...pkix.RevokedCertificate) ([]byte, error)

func GenerateClientCert

func GenerateClientCert(caCertPEM, caKeyPEM []byte, opts ...CertOption) ([]byte, []byte, error)

GenerateClientCert 使用给定的 CA 签发一个客户端证书。 caCertPEM 和 caKeyPEM 是 PEM 编码的 CA 证书和私钥。

func GenerateGMSelfSignedCertKey

func GenerateGMSelfSignedCertKey(commonName string) ([]byte, []byte, error)

func GeneratePrivateAndPublicKeyPEM

func GeneratePrivateAndPublicKeyPEM() (pri []byte, pub []byte, _ error)

func GeneratePrivateAndPublicKeyPEMWithPrivateFormatter added in v1.2.2

func GeneratePrivateAndPublicKeyPEMWithPrivateFormatter(t string) (pri []byte, pub []byte, _ error)

func GeneratePrivateAndPublicKeyPEMWithPrivateFormatterWithSize added in v1.2.3

func GeneratePrivateAndPublicKeyPEMWithPrivateFormatterWithSize(t string, size int) (pri []byte, pub []byte, _ error)

func GenerateSelfSignedCertKey

func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error)

func GenerateSelfSignedCertKeyWithCommonName

func GenerateSelfSignedCertKeyWithCommonName(commonName, host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error)

func GenerateSelfSignedCertKeyWithCommonNameEx

func GenerateSelfSignedCertKeyWithCommonNameEx(commonName, org, host string, alternateIPs []net.IP, alternateDNS []string, priv *rsa.PrivateKey, auth bool) ([]byte, []byte, error)

func GenerateSelfSignedCertKeyWithCommonNameWithPrivateKeyWithOrg added in v1.2.3

func GenerateSelfSignedCertKeyWithCommonNameWithPrivateKeyWithOrg(commonName, org, host string, alternateIPs []net.IP, alternateDNS []string, priv *rsa.PrivateKey) ([]byte, []byte, error)

func GenerateServerCert

func GenerateServerCert(caCertPEM, caKeyPEM []byte, opts ...CertOption) ([]byte, []byte, error)

GenerateServerCert 使用给定的 CA 签发一个服务器证书。 caCertPEM 和 caKeyPEM 是 PEM 编码的 CA 证书和私钥。

func GetRSAPrivateKey

func GetRSAPrivateKey(raw []byte) (*rsa.PrivateKey, error)

func GetRSAPubKey

func GetRSAPubKey(raw []byte) (*rsa.PublicKey, error)

func GetX509GMMutualAuthClientTlsConfig

func GetX509GMMutualAuthClientTlsConfig(clientCrt, clientPriv []byte, caCrts ...[]byte) (*gmtls.Config, error)

func GetX509GMServerTlsConfigWithAuth

func GetX509GMServerTlsConfigWithAuth(ca, server, serverKey []byte, auth bool) (*gmtls.Config, error)

func GetX509GMServerTlsConfigWithOnly added in v1.3.1

func GetX509GMServerTlsConfigWithOnly(ca, server, serverKey []byte, auth bool) (*gmtls.Config, error)

func GetX509MutualAuthClientTlsConfig

func GetX509MutualAuthClientTlsConfig(clientCrt, clientPriv []byte, caCrts ...[]byte) (*tls.Config, error)

func GetX509MutualAuthGoClientTlsConfig

func GetX509MutualAuthGoClientTlsConfig(clientCrt, clientPriv []byte, caCrts ...[]byte) (*tls.Config, error)

func GetX509MutualAuthServerTlsConfig

func GetX509MutualAuthServerTlsConfig(caPemRaw, serverCrt, keyPriv []byte) (*tls.Config, error)

func GetX509ServerTlsConfig

func GetX509ServerTlsConfig(caPemRaw, serverCrt, keyPriv []byte) (*tls.Config, error)

func GetX509ServerTlsConfigWithAuth

func GetX509ServerTlsConfigWithAuth(caPemRaw, serverCrt, keyPriv []byte, auth bool) (*tls.Config, error)

func LoadP12ToPEM added in v1.2.7

func LoadP12ToPEM(p12Data []byte, password string) (certBytes, keyBytes []byte, ca [][]byte, err error)

func MergeBlock

func MergeBlock(raw []string) ([]byte, error)

func NewDefaultTLSServer

func NewDefaultTLSServer(conn net.Conn) *tls.Conn

func ParseCertAndPriKeyAndPool

func ParseCertAndPriKeyAndPool(clientCrt, clientPriv []byte, caCrts ...[]byte) (tls.Certificate, *x509gm.CertPool, error)

func ParseCertAndPriKeyAndPoolForGM

func ParseCertAndPriKeyAndPoolForGM(clientCrt, clientPriv []byte, caCrts ...[]byte) (gmtls.Certificate, *x509gm.CertPool, error)

func ParseCertificate

func ParseCertificate(pemBytes []byte) (*x509.Certificate, error)

ParseCertificate 从 PEM 编码的字节中解析 x509.Certificate。

func ParseGMPEMCertificate

func ParseGMPEMCertificate(ca []byte) (*x509gm.Certificate, error)

func ParsePEMCRL

func ParsePEMCRL(ca []byte) ([]pkix.RevokedCertificate, error)

func ParsePEMCRLRaw

func ParsePEMCRLRaw(ca []byte) (*pkix.CertificateList, error)

func ParsePEMCert

func ParsePEMCert(crt []byte) (*x509.Certificate, error)

func ParsePEMCertificate

func ParsePEMCertificate(ca []byte) (*x509.Certificate, error)

func ParsePEMCertificateAndKey

func ParsePEMCertificateAndKey(ca, key []byte) (*x509.Certificate, *rsa.PrivateKey, error)

func ParsePEMCertificateAndKeyForGM

func ParsePEMCertificateAndKeyForGM(ca, key []byte) (*x509gm.Certificate, *sm2.PrivateKey, error)

func ParsePrivateKey

func ParsePrivateKey(pemBytes []byte) (crypto.Signer, error)

ParsePrivateKey 从 PEM 编码的字节中解析 crypto.Signer(私钥)。 它会尝试解析 PKCS#8 和 PKCS#1 格式的私钥。

func ParseRsaPrivateKeyFromDerBytes

func ParseRsaPrivateKeyFromDerBytes(derBytes []byte) (*rsa.PrivateKey, error)

func ParseRsaPrivateKeyFromPemBlock

func ParseRsaPrivateKeyFromPemBlock(block *pem.Block) (*rsa.PrivateKey, error)

func ParseRsaPublicKeyFromDerBytes

func ParseRsaPublicKeyFromDerBytes(derBytes []byte) (*rsa.PublicKey, error)

func ParseRsaPublicKeyFromPemBlock

func ParseRsaPublicKeyFromPemBlock(block *pem.Block) (*rsa.PublicKey, error)

func PemPkcs1v15Decrypt

func PemPkcs1v15Decrypt(pemPriBytes []byte, data interface{}) ([]byte, error)

func PemPkcs1v15Encrypt

func PemPkcs1v15Encrypt(pemBytes []byte, data interface{}) ([]byte, error)

func PemPkcsOAEPDecrypt added in v1.2.2

func PemPkcsOAEPDecrypt(pemPriBytes []byte, data interface{}) ([]byte, error)

func PemPkcsOAEPEncrypt added in v1.2.2

func PemPkcsOAEPEncrypt(raw []byte, data interface{}) ([]byte, error)

func PemSignSha256WithRSA

func PemSignSha256WithRSA(pemBytes []byte, data interface{}) ([]byte, error)

SignSHA256WithRSA 使用RSA私钥对数据进行SHA256签名,返回签名与错误 Example: ``` pemBytes = string(`-----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDZz5Zz3z3z3z3z ... -----END PRIVATE KEY-----`) signBytes, err := tls.SignSHA256WithRSA(pemBytes, "hello") die(err) signString = string(signBytes) ```

func PemVerifySignSha256WithRSA

func PemVerifySignSha256WithRSA(pemBytes []byte, originData any, sign []byte) error

SignVerifySHA256WithRSA 使用RSA公钥对数据进行SHA256签名验证,返回错误 Example: ``` pemBytes = string(`-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs1pvFYNQpPSPbshg6F7Z ... -----END PUBLIC KEY-----`) err := tls.PemVerifySignSha256WithRSA(pemBytes, "hello", signBytes) die(err) ```

func Pkcs1v15Decrypt

func Pkcs1v15Decrypt(raw []byte, data interface{}) ([]byte, error)

DecryptWithPkcs1v15/RSADecryptWithPKCS1v15 使用 RSA私钥 和 PKCS#1 v1.5填充方式 解密给定的密文。 参数 raw 表示 RSA 私钥,支持以下格式:

  • DER 编码的私钥(raw ASN.1 DER 字节流)
  • Base64 编码的 DER 格式(自动解码)
  • PEM 编码(包括带有 "-----BEGIN PRIVATE KEY-----" 或 "-----BEGIN RSA PRIVATE KEY-----" 的块)
  • Base64 编码的 PEM 格式(自动解码)

参数 data 是被加密后的数据(密文) 返回值是解密得到的原始明文,如果失败则返回错误。

Example: ```

	raw := `
	-----BEGIN PRIVATE KEY-----
	MIIEvQIBADANBgkqhkiG9w0BAQEFAASC...(略)
	-----END PRIVATE KEY-----
	`
	plaintext, err := DecryptWithPkcs1v15(raw, encryptedData)
 	plaintext, err := RSADecryptWithPKCS1v15(raw, encryptedData)

```

func Pkcs1v15Encrypt

func Pkcs1v15Encrypt(raw []byte, data interface{}) ([]byte, error)

EncryptWithPkcs1v15/RSAEncryptWithPKCS1v15 使用 RSA 公钥和 PKCS#1 v1.5 填充方式对给定数据进行加密。

参数 raw 表示 RSA 公钥,支持以下格式:

  • DER 编码的公钥(raw ASN.1 DER 字节流)
  • Base64 编码的 DER 格式(自动解码)
  • PEM 编码(例如 "-----BEGIN PUBLIC KEY-----" 或 "-----BEGIN RSA PUBLIC KEY-----" 块)
  • Base64 编码的 PEM 格式(自动解码)

参数 data 是要加密的明文数据,可以是 []byte、string 或其他可转换为字节数组的类型。 返回值是加密后的密文(字节切片),如果加密失败则返回错误。

Example: ```

	raw := `
	-----BEGIN PUBLIC KEY-----
	MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn...(略)
	-----END PUBLIC KEY-----
	`
	ciphertext, err := EncryptWithPkcs1v15(raw, "hello world")
 ciphertext, err := RSAEncryptWithPKCS1v15(raw, "hello world")

```

func PkcsOAEPDecrypt

func PkcsOAEPDecrypt(raw []byte, data interface{}) ([]byte, error)

RSADecryptWithOAEP 使用 RSA私钥 和 RSA-OAEP 填充方式解密给定的密文。 参数 raw 表示 RSA 私钥,支持以下格式:

  • DER 编码的私钥(raw ASN.1 DER 字节流)
  • Base64 编码的 DER 格式(自动解码)
  • PEM 编码(包括带有 "-----BEGIN PRIVATE KEY-----" 或 "-----BEGIN RSA PRIVATE KEY-----" 的块)
  • Base64 编码的 PEM 格式(自动解码)

参数 data 是加密后的数据(密文),可以是 []byte 或 base64 字符串等支持类型。 返回值是解密得到的原始明文,如果失败则返回错误。

示例:

raw := `
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASC...(略)
-----END PRIVATE KEY-----
`
plaintext, err := Pkcs1v15Decrypt([]byte(raw), encryptedData)

func PkcsOAEPDecryptWithHash

func PkcsOAEPDecryptWithHash(raw []byte, data interface{}, hashFunc hash.Hash) ([]byte, error)

func PkcsOAEPEncrypt

func PkcsOAEPEncrypt(raw []byte, data interface{}) ([]byte, error)

RSAEncryptWithOAEP 使用 RSA 公钥和 OAEP 填充方式对给定数据进行加密。

参数 raw 表示 RSA 公钥,支持以下格式:

  • DER 编码的公钥(raw ASN.1 DER 字节流)
  • Base64 编码的 DER 格式(自动解码)
  • PEM 编码(例如 "-----BEGIN PUBLIC KEY-----" 或 "-----BEGIN RSA PUBLIC KEY-----" 块)
  • Base64 编码的 PEM 格式(自动解码)

参数 data 是要加密的明文数据,可以是 []byte、string 或其他可转换为字节数组的类型。 返回值是加密后的密文(字节切片),如果加密失败则返回错误。

Example: ```

raw := `
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn...(略)
-----END PUBLIC KEY-----
`
ciphertext, err := RSAEncryptWithOAEP(raw, "hello world")

```

func PkcsOAEPEncryptWithHash

func PkcsOAEPEncryptWithHash(raw []byte, data interface{}, hashFunc hash.Hash) ([]byte, error)

func RSAGenerateKeyPair

func RSAGenerateKeyPair(bitSize int) ([]byte, []byte, error)

GenerateRSAKeyPair 根据给定的bit大小生成RSA公私钥对,返回PEM格式公钥和私钥与错误 Example: ``` pub, pri, err := tls.GenerateRSAKeyPair(2048) ```

func SM2GenerateKeyPair

func SM2GenerateKeyPair() ([]byte, []byte, error)

GenerateSM2KeyPair 生成SM2公私钥对,返回PEM格式公钥和私钥与错误 Example: ``` pub, pri, err := tls.GenerateSM2KeyPair() ```

func SelfSignCACertificateAndPrivateKey

func SelfSignCACertificateAndPrivateKey(common string, opts ...SelfSignConfigOpt) ([]byte, []byte, error)

func SignClientCrtNKey

func SignClientCrtNKey(ca, key []byte) ([]byte, []byte, error)

SignX509ClientCertAndKey 根据给定的CA证书和私钥,生成客户端证书和密钥,返回PEM格式的客户端证书和密钥与错误 Example: ``` ca, key, err = tls.GenerateRootCA("yaklang.io") cert, sKey, err = tls.SignX509ClientCertAndKey(ca, key) ```

func SignClientCrtNKeyEx

func SignClientCrtNKeyEx(ca []byte, key []byte, commonName string, auth bool) (cert []byte, sKey []byte, _ error)

func SignClientCrtNKeyWithParams

func SignClientCrtNKeyWithParams(ca, key []byte, cn string, notAfter time.Time, x509Auth bool) (cert []byte, skey []byte, _ error)

func SignClientCrtNKeyWithoutAuth added in v1.3.1

func SignClientCrtNKeyWithoutAuth(ca, key []byte) ([]byte, []byte, error)

SignClientCertAndKey 根据给定的CA证书和私钥,生成不包含认证的客户端证书和密钥,返回PEM格式的客户端证书和密钥与错误 Example: ``` ca, key, err = tls.GenerateRootCA("yaklang.io") cert, sKey, err = tls.SignClientCertAndKey(ca, key) ```

func SignGMClientCrtNKeyWithParams

func SignGMClientCrtNKeyWithParams(ca []byte, privateKey []byte, cn string, notAfter time.Time, auth bool) ([]byte, []byte, error)

func SignGMServerCrtNKeyWithParams

func SignGMServerCrtNKeyWithParams(ca []byte, privateKey []byte, cn string, notAfter time.Time, auth bool) ([]byte, []byte, error)

func SignServerCrtNKey

func SignServerCrtNKey(ca []byte, key []byte) (cert []byte, sKey []byte, _ error)

SignX509ServerCertAndKey 根据给定的CA证书和私钥,生成服务器证书和密钥,返回PEM格式的服务器证书和密钥与错误 Example: ``` ca, key, err = tls.GenerateRootCA("yaklang.io") cert, sKey, err = tls.SignX509ServerCertAndKey(ca, key) ```

func SignServerCrtNKeyEx

func SignServerCrtNKeyEx(ca []byte, key []byte, commonName string, auth bool) (cert []byte, sKey []byte, _ error)

func SignServerCrtNKeyWithParams

func SignServerCrtNKeyWithParams(ca []byte, key []byte, cn string, notAfter time.Time, authClient bool) (cert []byte, sKey []byte, _ error)

func SignServerCrtNKeyWithoutAuth added in v1.3.1

func SignServerCrtNKeyWithoutAuth(ca []byte, key []byte) (cert []byte, sKey []byte, _ error)

SignServerCertAndKey 根据给定的CA证书和私钥,生成不包含认证的服务器证书和密钥,返回PEM格式的服务器证书和密钥与错误 Example: ``` ca, key, err = tls.GenerateRootCA("yaklang.io") cert, sKey, err = tls.SignServerCertAndKey(ca, key) ```

func SplitBlock

func SplitBlock(raw []byte, blockSize int) ([]string, error)

Types

type CertConfig

type CertConfig struct {
	// Subject (主题) 信息
	Country            string
	Province           string
	Locality           string
	Organization       string
	OrganizationalUnit string
	CommonName         string

	// 有效期
	NotBefore time.Time
	NotAfter  time.Time

	// 主体备用名称 (SAN)
	AlternativeDNS []string
	AlternativeIPs []net.IP

	// 密钥用途
	KeyUsage    x509.KeyUsage
	ExtKeyUsage []x509.ExtKeyUsage

	// 要用于证书的私钥。如果为 nil, 将会自动生成一个新的 2048 位 RSA 私钥。
	PrivateKey crypto.Signer
}

CertConfig 包含了生成证书所需的所有可配置属性。

type CertOption

type CertOption func(*CertConfig)

CertOption 是一个用于配置 CertConfig 的函数类型。

func WithAlternativeDNS

func WithAlternativeDNS(dnsNames ...string) CertOption

WithAlternativeDNS 添加一个或多个 DNS 备用名称 (SAN)。

func WithAlternativeIPStrings

func WithAlternativeIPStrings(ipStrings ...string) CertOption

WithAlternativeIPStrings 添加一个或多个字符串格式的 IP 备用名称 (SAN)。 无效的 IP 字符串将被忽略。

func WithAlternativeIPs

func WithAlternativeIPs(ips ...net.IP) CertOption

WithAlternativeIPs 添加一个或多个 IP 备用名称 (SAN)。

func WithCommonName

func WithCommonName(cn string) CertOption

WithCommonName 设置证书的通用名称 (Common Name)。

func WithCountry

func WithCountry(country string) CertOption

func WithExtKeyUsage

func WithExtKeyUsage(usage ...x509.ExtKeyUsage) CertOption

WithExtKeyUsage 设置证书的扩展密钥用途 (Extended Key Usage)。

func WithKeyUsage

func WithKeyUsage(usage x509.KeyUsage) CertOption

WithKeyUsage 设置证书的密钥用途 (Key Usage)。

func WithLocality

func WithLocality(locality string) CertOption

func WithNotAfter

func WithNotAfter(t time.Time) CertOption

WithNotAfter 设置证书的过期时间。

func WithNotBefore

func WithNotBefore(t time.Time) CertOption

WithNotBefore 设置证书的生效时间。

func WithOrganization

func WithOrganization(org string) CertOption

WithOrganization 设置证书的组织 (Organization)。

func WithOrganizationalUnit

func WithOrganizationalUnit(ou string) CertOption

func WithPrivateKey

func WithPrivateKey(key crypto.Signer) CertOption

WithPrivateKey 使用一个已有的私钥来生成证书请求,而不是自动创建新私钥。 私钥必须实现 crypto.Signer 接口。

func WithPrivateKeyFromBytes

func WithPrivateKeyFromBytes(key []byte) CertOption

func WithPrivateKeyFromFile

func WithPrivateKeyFromFile(path string) CertOption

func WithProvince

func WithProvince(province string) CertOption

func WithValidity

func WithValidity(duration time.Duration) CertOption

WithValidity 设置证书的有效期(从现在开始,持续时间为 duration)。

type HandshakeClientHello

type HandshakeClientHello struct {
	Random             []byte
	Session            []byte
	CipherSuite        []byte
	CompressionMethods []byte
	ExtensionsRaw      []byte
	Extensions         []*HandshakeClientHelloExt
	// contains filtered or unexported fields
}

func ParseClientHello

func ParseClientHello(data []byte) (*HandshakeClientHello, error)

ParseClientHello parses a ClientHello message from the given data. It returns the parsed message and the number of bytes consumed.

func (*HandshakeClientHello) ALPN

func (h *HandshakeClientHello) ALPN() []string

func (*HandshakeClientHello) MaybeHttp

func (h *HandshakeClientHello) MaybeHttp() bool

func (*HandshakeClientHello) SNI

func (h *HandshakeClientHello) SNI() string

type HandshakeClientHelloExt

type HandshakeClientHelloExt struct {
	TypeRaw []byte
	TypeInt uint16
	Length  uint16
	RawData []byte
}

func (*HandshakeClientHelloExt) IsALPN

func (h *HandshakeClientHelloExt) IsALPN() ([]string, bool)

func (*HandshakeClientHelloExt) IsSNI

func (h *HandshakeClientHelloExt) IsSNI() (string, bool)

type SelfSignConfig

type SelfSignConfig struct {
	NotAfter       time.Time
	NotBefore      time.Time
	SignTo         []string
	PrivateKey     *rsa.PrivateKey
	EnableAuth     bool
	AlternativeDNS []string
	AlternativeIP  []string
	Org            string
}

type SelfSignConfigOpt

type SelfSignConfigOpt func(*SelfSignConfig)

func WithSelfSign_EnableAuth

func WithSelfSign_EnableAuth(b bool) SelfSignConfigOpt

func WithSelfSign_NotAfter

func WithSelfSign_NotAfter(t time.Time) SelfSignConfigOpt

func WithSelfSign_NotBefore

func WithSelfSign_NotBefore(t time.Time) SelfSignConfigOpt

func WithSelfSign_Organization added in v1.2.3

func WithSelfSign_Organization(s string) SelfSignConfigOpt

func WithSelfSign_PrivateKey

func WithSelfSign_PrivateKey(p *rsa.PrivateKey) SelfSignConfigOpt

func WithSelfSign_SignTo

func WithSelfSign_SignTo(s ...string) SelfSignConfigOpt

Directories

Path Synopsis
Package pkcs12 implements some of PKCS#12 (also known as P12 or PFX).
Package pkcs12 implements some of PKCS#12 (also known as P12 or PFX).
rc2
Package rc2 implements the RC2 cipher
Package rc2 implements the RC2 cipher

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL