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 | |
parent | 49c1c7b4dc69ffb9ab52330e6dc52ccdd6351087 (diff) | |
download | terraform-provider-statuscake-add_contact_groups.tar.gz terraform-provider-statuscake-add_contact_groups.tar.zst terraform-provider-statuscake-add_contact_groups.zip |
update vendor and go.modadd_contact_groups
Diffstat (limited to 'vendor/golang.org')
-rw-r--r-- | vendor/golang.org/x/crypto/openpgp/keys.go | 14 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/openpgp/packet/private_key.go | 26 |
2 files changed, 20 insertions, 20 deletions
diff --git a/vendor/golang.org/x/crypto/openpgp/keys.go b/vendor/golang.org/x/crypto/openpgp/keys.go index 3e25186..faa2fb3 100644 --- a/vendor/golang.org/x/crypto/openpgp/keys.go +++ b/vendor/golang.org/x/crypto/openpgp/keys.go | |||
@@ -504,7 +504,7 @@ const defaultRSAKeyBits = 2048 | |||
504 | // which may be empty but must not contain any of "()<>\x00". | 504 | // which may be empty but must not contain any of "()<>\x00". |
505 | // If config is nil, sensible defaults will be used. | 505 | // If config is nil, sensible defaults will be used. |
506 | func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) { | 506 | func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) { |
507 | currentTime := config.Now() | 507 | creationTime := config.Now() |
508 | 508 | ||
509 | bits := defaultRSAKeyBits | 509 | bits := defaultRSAKeyBits |
510 | if config != nil && config.RSABits != 0 { | 510 | if config != nil && config.RSABits != 0 { |
@@ -525,8 +525,8 @@ func NewEntity(name, comment, email string, config *packet.Config) (*Entity, err | |||
525 | } | 525 | } |
526 | 526 | ||
527 | e := &Entity{ | 527 | e := &Entity{ |
528 | PrimaryKey: packet.NewRSAPublicKey(currentTime, &signingPriv.PublicKey), | 528 | PrimaryKey: packet.NewRSAPublicKey(creationTime, &signingPriv.PublicKey), |
529 | PrivateKey: packet.NewRSAPrivateKey(currentTime, signingPriv), | 529 | PrivateKey: packet.NewRSAPrivateKey(creationTime, signingPriv), |
530 | Identities: make(map[string]*Identity), | 530 | Identities: make(map[string]*Identity), |
531 | } | 531 | } |
532 | isPrimaryId := true | 532 | isPrimaryId := true |
@@ -534,7 +534,7 @@ func NewEntity(name, comment, email string, config *packet.Config) (*Entity, err | |||
534 | Name: uid.Id, | 534 | Name: uid.Id, |
535 | UserId: uid, | 535 | UserId: uid, |
536 | SelfSignature: &packet.Signature{ | 536 | SelfSignature: &packet.Signature{ |
537 | CreationTime: currentTime, | 537 | CreationTime: creationTime, |
538 | SigType: packet.SigTypePositiveCert, | 538 | SigType: packet.SigTypePositiveCert, |
539 | PubKeyAlgo: packet.PubKeyAlgoRSA, | 539 | PubKeyAlgo: packet.PubKeyAlgoRSA, |
540 | Hash: config.Hash(), | 540 | Hash: config.Hash(), |
@@ -563,10 +563,10 @@ func NewEntity(name, comment, email string, config *packet.Config) (*Entity, err | |||
563 | 563 | ||
564 | e.Subkeys = make([]Subkey, 1) | 564 | e.Subkeys = make([]Subkey, 1) |
565 | e.Subkeys[0] = Subkey{ | 565 | e.Subkeys[0] = Subkey{ |
566 | PublicKey: packet.NewRSAPublicKey(currentTime, &encryptingPriv.PublicKey), | 566 | PublicKey: packet.NewRSAPublicKey(creationTime, &encryptingPriv.PublicKey), |
567 | PrivateKey: packet.NewRSAPrivateKey(currentTime, encryptingPriv), | 567 | PrivateKey: packet.NewRSAPrivateKey(creationTime, encryptingPriv), |
568 | Sig: &packet.Signature{ | 568 | Sig: &packet.Signature{ |
569 | CreationTime: currentTime, | 569 | CreationTime: creationTime, |
570 | SigType: packet.SigTypeSubkeyBinding, | 570 | SigType: packet.SigTypeSubkeyBinding, |
571 | PubKeyAlgo: packet.PubKeyAlgoRSA, | 571 | PubKeyAlgo: packet.PubKeyAlgoRSA, |
572 | Hash: config.Hash(), | 572 | Hash: config.Hash(), |
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 | } |