mirror of https://github.com/docker/docs.git
Removing debug adding pcs11 to makefiles
Signed-off-by: Diogo Monica <diogo@docker.com> Signed-off-by: David Lawrence <david.lawrence@docker.com> Signed-off-by: Diogo Monica <diogo@docker.com> (github: endophage)
This commit is contained in:
parent
b59225297a
commit
af1bf0c1d5
|
@ -15,6 +15,7 @@ COPY . /go/src/github.com/docker/notary
|
|||
WORKDIR /go/src/${NOTARYPKG}
|
||||
|
||||
RUN go install \
|
||||
-tags pkcs11 \
|
||||
-ldflags "-w -X ${NOTARYPKG}/version.GitCommit=`git rev-parse --short HEAD` -X ${NOTARYPKG}/version.NotaryVersion=`cat NOTARY_VERSION`" \
|
||||
${NOTARYPKG}/cmd/notary-server
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ WORKDIR /go/src/${NOTARYPKG}
|
|||
|
||||
# Install notary-signer
|
||||
RUN go install \
|
||||
-tags pkcs11 \
|
||||
-ldflags "-w -X ${NOTARYPKG}/version.GitCommit=`git rev-parse --short HEAD` -X ${NOTARYPKG}/version.NotaryVersion=`cat NOTARY_VERSION`" \
|
||||
${NOTARYPKG}/cmd/notary-signer
|
||||
|
||||
|
|
|
@ -99,7 +99,6 @@ func addECDSAKey(ctx *pkcs11.Ctx, session pkcs11.SessionHandle, privKey data.Pri
|
|||
}
|
||||
defer ctx.Logout(session)
|
||||
|
||||
fmt.Println("Parsing EC private key")
|
||||
// Create an ecdsa.PrivateKey out of the private key bytes
|
||||
ecdsaPrivKey, err := x509.ParseECPrivateKey(privKey.Private())
|
||||
if err != nil {
|
||||
|
@ -118,7 +117,6 @@ func addECDSAKey(ctx *pkcs11.Ctx, session pkcs11.SessionHandle, privKey data.Pri
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to create the certificate: %v", err)
|
||||
}
|
||||
fmt.Println("Got a certificate!")
|
||||
|
||||
certTemplate := []*pkcs11.Attribute{
|
||||
pkcs11.NewAttribute(pkcs11.CKA_CLASS, pkcs11.CKO_CERTIFICATE),
|
||||
|
@ -138,14 +136,11 @@ func addECDSAKey(ctx *pkcs11.Ctx, session pkcs11.SessionHandle, privKey data.Pri
|
|||
pkcs11.NewAttribute(pkcs11.CKA_VENDOR_DEFINED, 3),
|
||||
}
|
||||
|
||||
fmt.Println("About to import the certificate")
|
||||
|
||||
_, err = ctx.CreateObject(session, certTemplate)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error importing: %v", err)
|
||||
}
|
||||
|
||||
fmt.Println("About to import the private key")
|
||||
_, err = ctx.CreateObject(session, privateKeyTemplate)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error importing: %v", err)
|
||||
|
@ -340,7 +335,6 @@ func (s *YubiKeyStore) ImportKey(pemBytes []byte, keyID string) error {
|
|||
}
|
||||
|
||||
func cleanup(ctx *pkcs11.Ctx, session pkcs11.SessionHandle) {
|
||||
fmt.Println("Tearing down yubikey session")
|
||||
ctx.CloseSession(session)
|
||||
ctx.Finalize()
|
||||
ctx.Destroy()
|
||||
|
@ -348,7 +342,6 @@ func cleanup(ctx *pkcs11.Ctx, session pkcs11.SessionHandle) {
|
|||
|
||||
// SetupHSMEnv is a method that depends on the existences
|
||||
func SetupHSMEnv(libraryPath string) (*pkcs11.Ctx, pkcs11.SessionHandle, error) {
|
||||
fmt.Println("Setting up Yubikey")
|
||||
p := pkcs11.New(libraryPath)
|
||||
|
||||
if p == nil {
|
||||
|
|
Loading…
Reference in New Issue