mirror of
https://github.com/astaxie/beego.git
synced 2025-06-24 00:20:19 +00:00
update vendor & module
This commit is contained in:
.travis.ymlgo.modgo.summodules.txtvendor.json
vendor
github.com
Knetic
govaluate
.gitignore.travis.ymlCONTRIBUTORSEvaluableExpression.goEvaluableExpression_sql.goExpressionToken.goLICENSEMANUAL.mdOperatorSymbol.goREADME.mdTokenKind.goevaluationStage.goexpressionFunctions.goexpressionOutputStream.golexerState.golexerStream.goparameters.goparsing.gosanitizedParameters.gostagePlanner.gotest.shtokenStream.go
beego
goyaml2
x2j
belogik
bradfitz
gomemcache
casbin
casbin
cloudflare
couchbase
go-couchbase
.gitignore.travis.ymlLICENSEREADME.markdownaudit.goclient.goconn_pool.goddocs.goobserve.gopools.gostreaming.gotap.goupr.gousers.goutil.govbmap.goviews.go
gomemcached
goutils
cupcake
rdb
edsrzf
elazarl
go-bindata-assetfs
go-redis
redis
.gitignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdcluster.gocluster_commands.gocommand.gocommands.godoc.go
internal
iterator.gooptions.gopipeline.gopubsub.goredis.goresult.goring.goscript.gosentinel.gotx.gouniversal.gogo-sql-driver
mysql
gogo
protobuf
AUTHORSCONTRIBUTORSLICENSE
proto
Makefileclone.gocustom_gogo.godecode.godiscard.goduration.goduration_gogo.goencode.goencode_gogo.goequal.goextensions.goextensions_gogo.golib.golib_gogo.gomessage_set.gopointer_reflect.gopointer_reflect_gogo.gopointer_unsafe.gopointer_unsafe_gogo.goproperties.goproperties_gogo.goskip_gogo.gotable_marshal.gotable_marshal_gogo.gotable_merge.gotable_unmarshal.gotable_unmarshal_gogo.gotext.gotext_gogo.gotext_parser.gotimestamp.gotimestamp_gogo.go
golang
snappy
gomodule
redigo
lib
pq
mattn
go-sqlite3
.gitignore.travis.ymlLICENSEREADME.mdbackup.gocallback.godoc.goerror.gosqlite3-binding.csqlite3-binding.hsqlite3.gosqlite3_context.gosqlite3_func_crypt.gosqlite3_go18.gosqlite3_libsqlite3.gosqlite3_load_extension.gosqlite3_load_extension_omit.gosqlite3_opt_allow_uri_authority.gosqlite3_opt_app_armor.gosqlite3_opt_foreign_keys.gosqlite3_opt_fts5.gosqlite3_opt_icu.gosqlite3_opt_introspect.gosqlite3_opt_json1.gosqlite3_opt_secure_delete.gosqlite3_opt_secure_delete_fast.gosqlite3_opt_stat4.gosqlite3_opt_unlock_notify.csqlite3_opt_unlock_notify.gosqlite3_opt_userauth.gosqlite3_opt_userauth_omit.gosqlite3_opt_vacuum_full.gosqlite3_opt_vacuum_incr.gosqlite3_opt_vtable.gosqlite3_other.gosqlite3_solaris.gosqlite3_trace.gosqlite3_type.gosqlite3_usleep_windows.gosqlite3_windows.gosqlite3ext.hstatic_mock.go
pelletier
go-toml
pkg
siddontang
go
ledisdb
LICENSE
config
ledis
batch.goconst.godoc.godump.goevent.goledis.goledis_db.gomigrate.goreplication.goscan.gosort.got_hash.got_kv.got_list.got_set.got_ttl.got_zset.goutil.go
rpl
store
db.go
driver
goleveldb
iterator.goleveldb
batch.gocache.goconst.godb.gofilterpolicy.goiterator.goleveldb_ext.ccleveldb_ext.hlevigo-licenseoptions.goslice.gosnapshot.goutil.go
rocksdb
batch.gocache.goconst.godb.goenv.gofilterpolicy.goiterator.gooptions.gorocksdb_ext.ccrocksdb_ext.hslice.gosnapshot.goutil.go
slice.gosnapshot.gostat.gostore.gowritebatch.gordb
ssdb
syndtr
goleveldb
LICENSE
leveldb
batch.go
cache
comparer.gocomparer
db.godb_compaction.godb_iter.godb_snapshot.godb_state.godb_transaction.godb_util.godb_write.godoc.goerrors.goerrors
filter.gofilter
iterator
journal
key.gomemdb
opt
options.gosession.gosession_compaction.gosession_record.gosession_util.gostorage.gostorage
file_storage.gofile_storage_nacl.gofile_storage_plan9.gofile_storage_solaris.gofile_storage_unix.gofile_storage_windows.gomem_storage.gostorage.go
table.gotable
util.goutil
version.gowendal
golang.org
x
google.golang.org
appengine
gopkg.in
yaml.v2
3
vendor/golang.org/x/crypto/AUTHORS
generated
vendored
3
vendor/golang.org/x/crypto/AUTHORS
generated
vendored
@ -1,3 +0,0 @@
|
||||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at https://tip.golang.org/AUTHORS.
|
3
vendor/golang.org/x/crypto/CONTRIBUTORS
generated
vendored
3
vendor/golang.org/x/crypto/CONTRIBUTORS
generated
vendored
@ -1,3 +0,0 @@
|
||||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at https://tip.golang.org/CONTRIBUTORS.
|
9
vendor/golang.org/x/crypto/acme/acme.go
generated
vendored
9
vendor/golang.org/x/crypto/acme/acme.go
generated
vendored
@ -46,9 +46,8 @@ const (
|
||||
// ALPNProto is the ALPN protocol name used by a CA server when validating
|
||||
// tls-alpn-01 challenges.
|
||||
//
|
||||
// Package users must ensure their servers can negotiate the ACME ALPN in
|
||||
// order for tls-alpn-01 challenge verifications to succeed.
|
||||
// See the crypto/tls package's Config.NextProtos field.
|
||||
// Package users must ensure their servers can negotiate the ACME ALPN
|
||||
// in order for tls-alpn-01 challenge verifications to succeed.
|
||||
ALPNProto = "acme-tls/1"
|
||||
)
|
||||
|
||||
@ -77,10 +76,6 @@ const (
|
||||
type Client struct {
|
||||
// Key is the account key used to register with a CA and sign requests.
|
||||
// Key.Public() must return a *rsa.PublicKey or *ecdsa.PublicKey.
|
||||
//
|
||||
// The following algorithms are supported:
|
||||
// RS256, ES256, ES384 and ES512.
|
||||
// See RFC7518 for more details about the algorithms.
|
||||
Key crypto.Signer
|
||||
|
||||
// HTTPClient optionally specifies an HTTP client to use
|
||||
|
34
vendor/golang.org/x/crypto/acme/autocert/autocert.go
generated
vendored
34
vendor/golang.org/x/crypto/acme/autocert/autocert.go
generated
vendored
@ -44,7 +44,7 @@ var createCertRetryAfter = time.Minute
|
||||
var pseudoRand *lockedMathRand
|
||||
|
||||
func init() {
|
||||
src := mathrand.NewSource(time.Now().UnixNano())
|
||||
src := mathrand.NewSource(timeNow().UnixNano())
|
||||
pseudoRand = &lockedMathRand{rnd: mathrand.New(src)}
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ func HostWhitelist(hosts ...string) HostPolicy {
|
||||
}
|
||||
return func(_ context.Context, host string) error {
|
||||
if !whitelist[host] {
|
||||
return fmt.Errorf("acme/autocert: host %q not configured in HostWhitelist", host)
|
||||
return errors.New("acme/autocert: host not configured")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -183,9 +183,6 @@ type Manager struct {
|
||||
// for tls-alpn.
|
||||
// The entries are stored for the duration of the authorization flow.
|
||||
certTokens map[string]*tls.Certificate
|
||||
// nowFunc, if not nil, returns the current time. This may be set for
|
||||
// testing purposes.
|
||||
nowFunc func() time.Time
|
||||
}
|
||||
|
||||
// certKey is the key by which certificates are tracked in state, renewal and cache.
|
||||
@ -226,11 +223,6 @@ func (m *Manager) TLSConfig() *tls.Config {
|
||||
// a new cert. A non-nil error returned from m.HostPolicy halts TLS negotiation.
|
||||
// The error is propagated back to the caller of GetCertificate and is user-visible.
|
||||
// This does not affect cached certs. See HostPolicy field description for more details.
|
||||
//
|
||||
// If GetCertificate is used directly, instead of via Manager.TLSConfig, package users will
|
||||
// also have to add acme.ALPNProto to NextProtos for tls-alpn-01, or use HTTPHandler
|
||||
// for http-01. (The tls-sni-* challenges have been deprecated by popular ACME providers
|
||||
// due to security issues in the ecosystem.)
|
||||
func (m *Manager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||
if m.Prompt == nil {
|
||||
return nil, errors.New("acme/autocert: Manager.Prompt not set")
|
||||
@ -364,8 +356,8 @@ func supportsECDSA(hello *tls.ClientHelloInfo) bool {
|
||||
// Because the fallback handler is run with unencrypted port 80 requests,
|
||||
// the fallback should not serve TLS-only requests.
|
||||
//
|
||||
// If HTTPHandler is never called, the Manager will only use the "tls-alpn-01"
|
||||
// challenge for domain verification.
|
||||
// If HTTPHandler is never called, the Manager will only use TLS SNI
|
||||
// challenges for domain verification.
|
||||
func (m *Manager) HTTPHandler(fallback http.Handler) http.Handler {
|
||||
m.tokensMu.Lock()
|
||||
defer m.tokensMu.Unlock()
|
||||
@ -483,7 +475,7 @@ func (m *Manager) cacheGet(ctx context.Context, ck certKey) (*tls.Certificate, e
|
||||
}
|
||||
|
||||
// verify and create TLS cert
|
||||
leaf, err := validCert(ck, pubDER, privKey, m.now())
|
||||
leaf, err := validCert(ck, pubDER, privKey)
|
||||
if err != nil {
|
||||
return nil, ErrCacheMiss
|
||||
}
|
||||
@ -578,7 +570,7 @@ func (m *Manager) createCert(ctx context.Context, ck certKey) (*tls.Certificate,
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if _, err := validCert(ck, s.cert, s.key, m.now()); err == nil {
|
||||
if _, err := validCert(ck, s.cert, s.key); err == nil {
|
||||
return
|
||||
}
|
||||
delete(m.state, ck)
|
||||
@ -647,7 +639,7 @@ func (m *Manager) authorizedCert(ctx context.Context, key crypto.Signer, ck cert
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
leaf, err = validCert(ck, der, key, m.now())
|
||||
leaf, err = validCert(ck, der, key)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@ -991,13 +983,6 @@ func (m *Manager) renewBefore() time.Duration {
|
||||
return 720 * time.Hour // 30 days
|
||||
}
|
||||
|
||||
func (m *Manager) now() time.Time {
|
||||
if m.nowFunc != nil {
|
||||
return m.nowFunc()
|
||||
}
|
||||
return time.Now()
|
||||
}
|
||||
|
||||
// certState is ready when its mutex is unlocked for reading.
|
||||
type certState struct {
|
||||
sync.RWMutex
|
||||
@ -1064,7 +1049,7 @@ func parsePrivateKey(der []byte) (crypto.Signer, error) {
|
||||
// are valid. It doesn't do any revocation checking.
|
||||
//
|
||||
// The returned value is the verified leaf cert.
|
||||
func validCert(ck certKey, der [][]byte, key crypto.Signer, now time.Time) (leaf *x509.Certificate, err error) {
|
||||
func validCert(ck certKey, der [][]byte, key crypto.Signer) (leaf *x509.Certificate, err error) {
|
||||
// parse public part(s)
|
||||
var n int
|
||||
for _, b := range der {
|
||||
@ -1081,6 +1066,7 @@ func validCert(ck certKey, der [][]byte, key crypto.Signer, now time.Time) (leaf
|
||||
}
|
||||
// verify the leaf is not expired and matches the domain name
|
||||
leaf = x509Cert[0]
|
||||
now := timeNow()
|
||||
if now.Before(leaf.NotBefore) {
|
||||
return nil, errors.New("acme/autocert: certificate is not valid yet")
|
||||
}
|
||||
@ -1134,6 +1120,8 @@ func (r *lockedMathRand) int63n(max int64) int64 {
|
||||
|
||||
// For easier testing.
|
||||
var (
|
||||
timeNow = time.Now
|
||||
|
||||
// Called when a state is removed.
|
||||
testDidRemoveState = func(certKey) {}
|
||||
)
|
||||
|
2
vendor/golang.org/x/crypto/acme/autocert/renewal.go
generated
vendored
2
vendor/golang.org/x/crypto/acme/autocert/renewal.go
generated
vendored
@ -128,7 +128,7 @@ func (dr *domainRenewal) do(ctx context.Context) (time.Duration, error) {
|
||||
}
|
||||
|
||||
func (dr *domainRenewal) next(expiry time.Time) time.Duration {
|
||||
d := expiry.Sub(dr.m.now()) - dr.m.renewBefore()
|
||||
d := expiry.Sub(timeNow()) - dr.m.renewBefore()
|
||||
// add a bit of randomness to renew deadline
|
||||
n := pseudoRand.int63n(int64(renewJitter))
|
||||
d -= time.Duration(n)
|
||||
|
29
vendor/golang.org/x/crypto/acme/jws.go
generated
vendored
29
vendor/golang.org/x/crypto/acme/jws.go
generated
vendored
@ -25,7 +25,7 @@ func jwsEncodeJSON(claimset interface{}, key crypto.Signer, nonce string) ([]byt
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
alg, sha := jwsHasher(key.Public())
|
||||
alg, sha := jwsHasher(key)
|
||||
if alg == "" || !sha.Available() {
|
||||
return nil, ErrUnsupportedKey
|
||||
}
|
||||
@ -97,16 +97,13 @@ func jwkEncode(pub crypto.PublicKey) (string, error) {
|
||||
}
|
||||
|
||||
// jwsSign signs the digest using the given key.
|
||||
// The hash is unused for ECDSA keys.
|
||||
//
|
||||
// Note: non-stdlib crypto.Signer implementations are expected to return
|
||||
// the signature in the format as specified in RFC7518.
|
||||
// See https://tools.ietf.org/html/rfc7518 for more details.
|
||||
// It returns ErrUnsupportedKey if the key type is unknown.
|
||||
// The hash is used only for RSA keys.
|
||||
func jwsSign(key crypto.Signer, hash crypto.Hash, digest []byte) ([]byte, error) {
|
||||
if key, ok := key.(*ecdsa.PrivateKey); ok {
|
||||
// The key.Sign method of ecdsa returns ASN1-encoded signature.
|
||||
// So, we use the package Sign function instead
|
||||
// to get R and S values directly and format the result accordingly.
|
||||
switch key := key.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
return key.Sign(rand.Reader, digest, hash)
|
||||
case *ecdsa.PrivateKey:
|
||||
r, s, err := ecdsa.Sign(rand.Reader, key, digest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -121,18 +118,18 @@ func jwsSign(key crypto.Signer, hash crypto.Hash, digest []byte) ([]byte, error)
|
||||
copy(sig[size*2-len(sb):], sb)
|
||||
return sig, nil
|
||||
}
|
||||
return key.Sign(rand.Reader, digest, hash)
|
||||
return nil, ErrUnsupportedKey
|
||||
}
|
||||
|
||||
// jwsHasher indicates suitable JWS algorithm name and a hash function
|
||||
// to use for signing a digest with the provided key.
|
||||
// It returns ("", 0) if the key is not supported.
|
||||
func jwsHasher(pub crypto.PublicKey) (string, crypto.Hash) {
|
||||
switch pub := pub.(type) {
|
||||
case *rsa.PublicKey:
|
||||
func jwsHasher(key crypto.Signer) (string, crypto.Hash) {
|
||||
switch key := key.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
return "RS256", crypto.SHA256
|
||||
case *ecdsa.PublicKey:
|
||||
switch pub.Params().Name {
|
||||
case *ecdsa.PrivateKey:
|
||||
switch key.Params().Name {
|
||||
case "P-256":
|
||||
return "ES256", crypto.SHA256
|
||||
case "P-384":
|
||||
|
Reference in New Issue
Block a user