mirror of
https://github.com/containers/podman.git
synced 2025-11-29 17:48:05 +08:00
Update vendor containers/(common,storage,buildah,image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
1
vendor/github.com/letsencrypt/boulder/core/interfaces.go
generated
vendored
1
vendor/github.com/letsencrypt/boulder/core/interfaces.go
generated
vendored
@@ -7,7 +7,6 @@ import (
|
||||
// PolicyAuthority defines the public interface for the Boulder PA
|
||||
// TODO(#5891): Move this interface to a more appropriate location.
|
||||
type PolicyAuthority interface {
|
||||
WillingToIssue(domain identifier.ACMEIdentifier) error
|
||||
WillingToIssueWildcards(identifiers []identifier.ACMEIdentifier) error
|
||||
ChallengesFor(domain identifier.ACMEIdentifier) ([]Challenge, error)
|
||||
ChallengeTypeEnabled(t AcmeChallenge) bool
|
||||
|
||||
37
vendor/github.com/letsencrypt/boulder/core/objects.go
generated
vendored
37
vendor/github.com/letsencrypt/boulder/core/objects.go
generated
vendored
@@ -11,6 +11,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/ocsp"
|
||||
"gopkg.in/square/go-jose.v2"
|
||||
|
||||
"github.com/letsencrypt/boulder/identifier"
|
||||
@@ -78,6 +79,11 @@ const (
|
||||
OCSPStatusRevoked = OCSPStatus("revoked")
|
||||
)
|
||||
|
||||
var OCSPStatusToInt = map[OCSPStatus]int{
|
||||
OCSPStatusGood: ocsp.Good,
|
||||
OCSPStatusRevoked: ocsp.Revoked,
|
||||
}
|
||||
|
||||
// DNSPrefix is attached to DNS names in DNS challenges
|
||||
const DNSPrefix = "_acme-challenge"
|
||||
|
||||
@@ -534,3 +540,34 @@ type SuggestedWindow struct {
|
||||
type RenewalInfo struct {
|
||||
SuggestedWindow SuggestedWindow `json:"suggestedWindow"`
|
||||
}
|
||||
|
||||
// RenewalInfoSimple constructs a `RenewalInfo` object and suggested window
|
||||
// using a very simple renewal calculation: calculate a point 2/3rds of the way
|
||||
// through the validity period, then give a 2-day window around that. Both the
|
||||
// `issued` and `expires` timestamps are expected to be UTC.
|
||||
func RenewalInfoSimple(issued time.Time, expires time.Time) RenewalInfo {
|
||||
validity := expires.Add(time.Second).Sub(issued)
|
||||
renewalOffset := validity / time.Duration(3)
|
||||
idealRenewal := expires.Add(-renewalOffset)
|
||||
return RenewalInfo{
|
||||
SuggestedWindow: SuggestedWindow{
|
||||
Start: idealRenewal.Add(-24 * time.Hour),
|
||||
End: idealRenewal.Add(24 * time.Hour),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// RenewalInfoImmediate constructs a `RenewalInfo` object with a suggested
|
||||
// window in the past. Per the draft-ietf-acme-ari-00 spec, clients should
|
||||
// attempt to renew immediately if the suggested window is in the past. The
|
||||
// passed `now` is assumed to be a timestamp representing the current moment in
|
||||
// time.
|
||||
func RenewalInfoImmediate(now time.Time) RenewalInfo {
|
||||
oneHourAgo := now.Add(-1 * time.Hour)
|
||||
return RenewalInfo{
|
||||
SuggestedWindow: SuggestedWindow{
|
||||
Start: oneHourAgo,
|
||||
End: oneHourAgo.Add(time.Minute * 30),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
4
vendor/github.com/letsencrypt/boulder/core/util.go
generated
vendored
4
vendor/github.com/letsencrypt/boulder/core/util.go
generated
vendored
@@ -13,9 +13,9 @@ import (
|
||||
"expvar"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math/big"
|
||||
mrand "math/rand"
|
||||
"os"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"sort"
|
||||
@@ -245,7 +245,7 @@ func UniqueLowerNames(names []string) (unique []string) {
|
||||
|
||||
// LoadCert loads a PEM certificate specified by filename or returns an error
|
||||
func LoadCert(filename string) (*x509.Certificate, error) {
|
||||
certPEM, err := ioutil.ReadFile(filename)
|
||||
certPEM, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user