Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created December 14, 2019 01:14
Show Gist options
  • Save manakuro/1623e7464458faf4a87da29a0b062bb5 to your computer and use it in GitHub Desktop.
Save manakuro/1623e7464458faf4a87da29a0b062bb5 to your computer and use it in GitHub Desktop.
func GetRSAPublicKey() (*rsa.PublicKey, error) {
keyData, err := ioutil.ReadFile("id_rsa.pub.pkcs8")
if err != nil {
return nil, err
}
return jwt.ParseRSAPublicKeyFromPEM(keyData)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment