diff options
author | Alexandre Garand <alexandre.garand@fretlink.com> | 2019-08-09 15:59:15 +0200 |
---|---|---|
committer | Alexandre Garand <alexandre.garand@fretlink.com> | 2019-08-09 16:39:21 +0200 |
commit | 863486a6b71ed0e562a3965bed56465d007b1418 (patch) | |
tree | e93f6a687695af86d54237ec9f575d4ef104222d /vendor/golang.org/x/crypto/openpgp/packet/private_key.go | |
parent | 49c1c7b4dc69ffb9ab52330e6dc52ccdd6351087 (diff) | |
download | terraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.tar.gz terraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.tar.zst terraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.zip |
update vendor and go.modadd_contact_groups
Diffstat (limited to 'vendor/golang.org/x/crypto/openpgp/packet/private_key.go')
-rw-r--r-- | vendor/golang.org/x/crypto/openpgp/packet/private_key.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go index bd31cce..6f8ec09 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go | |||
@@ -36,49 +36,49 @@ type PrivateKey struct { | |||
36 | iv []byte | 36 | iv []byte |
37 | } | 37 | } |
38 | 38 | ||
39 | func NewRSAPrivateKey(currentTime time.Time, priv *rsa.PrivateKey) *PrivateKey { | 39 | func NewRSAPrivateKey(creationTime time.Time, priv *rsa.PrivateKey) *PrivateKey { |
40 | pk := new(PrivateKey) | 40 | pk := new(PrivateKey) |
41 | pk.PublicKey = *NewRSAPublicKey(currentTime, &priv.PublicKey) | 41 | pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey) |
42 | pk.PrivateKey = priv | 42 | pk.PrivateKey = priv |
43 | return pk | 43 | return pk |
44 | } | 44 | } |
45 | 45 | ||
46 | func NewDSAPrivateKey(currentTime time.Time, priv *dsa.PrivateKey) *PrivateKey { | 46 | func NewDSAPrivateKey(creationTime time.Time, priv *dsa.PrivateKey) *PrivateKey { |
47 | pk := new(PrivateKey) | 47 | pk := new(PrivateKey) |
48 | pk.PublicKey = *NewDSAPublicKey(currentTime, &priv.PublicKey) | 48 | pk.PublicKey = *NewDSAPublicKey(creationTime, &priv.PublicKey) |
49 | pk.PrivateKey = priv | 49 | pk.PrivateKey = priv |
50 | return pk | 50 | return pk |
51 | } | 51 | } |
52 | 52 | ||
53 | func NewElGamalPrivateKey(currentTime time.Time, priv *elgamal.PrivateKey) *PrivateKey { | 53 | func NewElGamalPrivateKey(creationTime time.Time, priv *elgamal.PrivateKey) *PrivateKey { |
54 | pk := new(PrivateKey) | 54 | pk := new(PrivateKey) |
55 | pk.PublicKey = *NewElGamalPublicKey(currentTime, &priv.PublicKey) | 55 | pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey) |
56 | pk.PrivateKey = priv | 56 | pk.PrivateKey = priv |
57 | return pk | 57 | return pk |
58 | } | 58 | } |
59 | 59 | ||
60 | func NewECDSAPrivateKey(currentTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey { | 60 | func NewECDSAPrivateKey(creationTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey { |
61 | pk := new(PrivateKey) | 61 | pk := new(PrivateKey) |
62 | pk.PublicKey = *NewECDSAPublicKey(currentTime, &priv.PublicKey) | 62 | pk.PublicKey = *NewECDSAPublicKey(creationTime, &priv.PublicKey) |
63 | pk.PrivateKey = priv | 63 | pk.PrivateKey = priv |
64 | return pk | 64 | return pk |
65 | } | 65 | } |
66 | 66 | ||
67 | // NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that | 67 | // NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that |
68 | // implements RSA or ECDSA. | 68 | // implements RSA or ECDSA. |
69 | func NewSignerPrivateKey(currentTime time.Time, signer crypto.Signer) *PrivateKey { | 69 | func NewSignerPrivateKey(creationTime time.Time, signer crypto.Signer) *PrivateKey { |
70 | pk := new(PrivateKey) | 70 | pk := new(PrivateKey) |
71 | // In general, the public Keys should be used as pointers. We still | 71 | // In general, the public Keys should be used as pointers. We still |
72 | // type-switch on the values, for backwards-compatibility. | 72 | // type-switch on the values, for backwards-compatibility. |
73 | switch pubkey := signer.Public().(type) { | 73 | switch pubkey := signer.Public().(type) { |
74 | case *rsa.PublicKey: | 74 | case *rsa.PublicKey: |
75 | pk.PublicKey = *NewRSAPublicKey(currentTime, pubkey) | 75 | pk.PublicKey = *NewRSAPublicKey(creationTime, pubkey) |
76 | case rsa.PublicKey: | 76 | case rsa.PublicKey: |
77 | pk.PublicKey = *NewRSAPublicKey(currentTime, &pubkey) | 77 | pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey) |
78 | case *ecdsa.PublicKey: | 78 | case *ecdsa.PublicKey: |
79 | pk.PublicKey = *NewECDSAPublicKey(currentTime, pubkey) | 79 | pk.PublicKey = *NewECDSAPublicKey(creationTime, pubkey) |
80 | case ecdsa.PublicKey: | 80 | case ecdsa.PublicKey: |
81 | pk.PublicKey = *NewECDSAPublicKey(currentTime, &pubkey) | 81 | pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey) |
82 | default: | 82 | default: |
83 | panic("openpgp: unknown crypto.Signer type in NewSignerPrivateKey") | 83 | panic("openpgp: unknown crypto.Signer type in NewSignerPrivateKey") |
84 | } | 84 | } |