mirror of
https://github.com/containers/skopeo.git
synced 2025-09-14 22:10:00 +00:00
Update to c/image v4.0.1
Update to use the correct c/image/v4 import path, work originally from https://github.com/containers/skopeo/pull/733 by Valentin Rothberg <rothberg@redhat.com>. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
881edbf122
commit
7922028d7c
24
vendor/github.com/containers/libtrust/ec_key_openssl.go
generated
vendored
Normal file
24
vendor/github.com/containers/libtrust/ec_key_openssl.go
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// +build libtrust_openssl
|
||||
|
||||
package libtrust
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/ecdsa"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
func (k *ecPrivateKey) sign(data io.Reader, hashID crypto.Hash) (r, s *big.Int, err error) {
|
||||
hId := k.signatureAlgorithm.HashID()
|
||||
buf := new(bytes.Buffer)
|
||||
_, err = buf.ReadFrom(data)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("error reading data: %s", err)
|
||||
}
|
||||
|
||||
return ecdsa.HashSign(rand.Reader, k.PrivateKey, buf.Bytes(), hId)
|
||||
}
|
Reference in New Issue
Block a user