$ ./skopeo copy docker://docker.io/library/nginx:latest oci:nginx_local
Getting image source signatures
Copying blob 000eee12ec04 done
Copying blob eb22865337de done
Copying blob bee5d581ef8b done
Copying config 5eb6083c55 done
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkg/server/endpoints/config.go b/pkg/server/endpoints/config.go | |
index 1263d1c3..dfab306f 100644 | |
--- a/pkg/server/endpoints/config.go | |
+++ b/pkg/server/endpoints/config.go | |
@@ -74,12 +74,11 @@ type Config struct { | |
func (c *Config) makeOldAPIServers() OldAPIServers { | |
registrationHandler := ®istration.Handler{ | |
- Log: c.Log.WithField(telemetry.SubsystemName, telemetry.RegistrationAPI), | |
- Metrics: c.Metrics, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/json" | |
"fmt" | |
"github.com/containers/ocicrypt/keywrap/keyprovider" | |
"io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@ubuntu-bionic:~/go/src/github.com/containers/skopeo$ git status | |
On branch sample_integration | |
Your branch is up to date with 'lumjjb/sample_integration'. | |
nothing to commit, working tree clean | |
vagrant@ubuntu-bionic:~/go/src/github.com/containers/skopeo$ make binary-local | |
GO111MODULE=on go build -mod=vendor "-buildmode=pie" -ldflags "-X main.gitCommit=dd22ad346a34ad6fc8b0cb6a1a22d2e02a01d0a0" -gcflags "" -tags " " -o skopeo ./cmd/skopeo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/ecdsa" | |
"encoding/json" | |
"fmt" | |
"os" | |
"github.com/containers/ocicrypt/config" | |
"github.com/containers/ocicrypt/keywrap" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GetPrivateKeyFromBroker will obtain the Wrapped(privatekey) at keyUrl via the | |
// workload service at wlsUrl, authenticated with wlsCertificate. | |
// | |
// It will then communicate with the local TPM to unwrap the private key. | |
func GetPrivateKeyFromBroker(wlsUrl string, wlsCertificate []byte, keyUrl string) (privateKey []byte, err error) { | |
privateKey = []byte(`-----BEGIN RSA PRIVATE KEY----- | |
MIIEowIBAAKCAQEAnYarY9vO4oiCgMqIWNStjUdg+1x0NKKxVBLXhkUsY6JiTSUl | |
j8I3NThHIpML2A9T0GNSCXFpWob3ORxd0LlPrqSNhXl0PrJlJoT4f1ExV44Rjzww | |
IeqvK3d/KktCQlSbvo4111I4TRHMG1ywtz38NxE2ID/yyoH5rlUZtKY4pOBV+ktP | |
1V3hCfwPJJAyf/xuGgzpijUCjJYVtmsmGshxbo3JwGKTAXHD7CmCRXv3eqjHVqPV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/containers/ocicrypt/config" | |
"github.com/containers/ocicrypt/keywrap" | |
"github.com/google/uuid" | |
"github.com/pkg/errors" | |
"io/ioutil" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Preparing the build | |
1. Build the encryption `imgcrypt` decoder and `ctr` helpers. Because the current branch is designed for `containerd/imgcrypt`, but is a fork, it can be built by: | |
``` | |
cd $GOPATH/containerd/ | |
git clone git@github.com:stefanberger/imgcrypt.git | |
cd imgcrypt | |
make | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import ctypes | |
from pwn import * | |
import struct | |
def u(s): | |
return struct.unpack("<i", s)[0] | |
r = remote('pound.pwning.xxx', 9765, ssl=False) |