mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 10:27:08 +00:00
[release-1.14] Bump ocicrypt and go-jose CVE-2024-28180
Bump github.com/go-jose/go-jose to v3.0.0 and github.com/containers/ocicrypt to v1.1.10 Addresses: CVE-2024-28180 https://issues.redhat.com/browse/RHEL-28736 https://issues.redhat.com/browse/RHEL-28728 https://issues.redhat.com/browse/OCPBUGS-30723 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
13
vendor/github.com/containers/ocicrypt/utils/testing.go
generated
vendored
13
vendor/github.com/containers/ocicrypt/utils/testing.go
generated
vendored
@@ -38,6 +38,15 @@ func CreateRSAKey(bits int) (*rsa.PrivateKey, error) {
|
||||
return key, nil
|
||||
}
|
||||
|
||||
// CreateECDSAKey creates an elliptic curve key for the given curve
|
||||
func CreateECDSAKey(curve elliptic.Curve) (*ecdsa.PrivateKey, error) {
|
||||
key, err := ecdsa.GenerateKey(curve, rand.Reader)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("ecdsa.GenerateKey failed: %w", err)
|
||||
}
|
||||
return key, nil
|
||||
}
|
||||
|
||||
// CreateRSATestKey creates an RSA key of the given size and returns
|
||||
// the public and private key in PEM or DER format
|
||||
func CreateRSATestKey(bits int, password []byte, pemencode bool) ([]byte, []byte, error) {
|
||||
@@ -85,9 +94,9 @@ func CreateRSATestKey(bits int, password []byte, pemencode bool) ([]byte, []byte
|
||||
// CreateECDSATestKey creates and elliptic curve key for the given curve and returns
|
||||
// the public and private key in DER format
|
||||
func CreateECDSATestKey(curve elliptic.Curve) ([]byte, []byte, error) {
|
||||
key, err := ecdsa.GenerateKey(curve, rand.Reader)
|
||||
key, err := CreateECDSAKey(curve)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("ecdsa.GenerateKey failed: %w", err)
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
pubData, err := x509.MarshalPKIXPublicKey(&key.PublicKey)
|
||||
|
Reference in New Issue
Block a user