forked from Mirrors/oauth2
oauth2/google: better instructions for the PKCS12 to PEM conversion
Change-Id: Ibcbde1e0131e0a1f90f66978d9b9a7f3aa3dceb6 Reviewed-on: https://go-review.googlesource.com/1660 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
928c2dd7dc
commit
13407478f7
|
@ -83,9 +83,10 @@ func Example_serviceAccount() {
|
||||||
// If you have a p12 file instead, you
|
// If you have a p12 file instead, you
|
||||||
// can use `openssl` to export the private key into a pem file.
|
// can use `openssl` to export the private key into a pem file.
|
||||||
//
|
//
|
||||||
// $ openssl pkcs12 -in key.p12 -out key.pem -nodes
|
// $ openssl pkcs12 -in key.p12 -passin pass:notasecret -out key.pem -nodes
|
||||||
//
|
//
|
||||||
// It only supports PEM containers with no passphrase.
|
// The field only supports PEM containers with no passphrase.
|
||||||
|
// The openssl command will convert p12 keys to passphrase-less PEM containers.
|
||||||
PrivateKey: []byte("-----BEGIN RSA PRIVATE KEY-----..."),
|
PrivateKey: []byte("-----BEGIN RSA PRIVATE KEY-----..."),
|
||||||
Scopes: []string{
|
Scopes: []string{
|
||||||
"https://www.googleapis.com/auth/bigquery",
|
"https://www.googleapis.com/auth/bigquery",
|
||||||
|
|
Loading…
Reference in New Issue