mirror of https://github.com/docker/docs.git
Merge pull request #697 from aaronlehmann/cosmetic
trustmanager: Minor cosmetic source code fixes
This commit is contained in:
commit
dc445b4a3a
|
@ -133,6 +133,6 @@ func TestVerifyLeafWithNoLeaf(t *testing.T) {
|
||||||
// Try to find a valid chain for cert
|
// Try to find a valid chain for cert
|
||||||
err = Verify(store, "secure.example.com", certList)
|
err = Verify(store, "secure.example.com", certList)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatalf("expected error due to no leafs provided")
|
t.Fatalf("expected error due to no leaves provided")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -541,8 +541,8 @@ func CertsToKeys(leafCerts []*x509.Certificate, intCerts map[string][]*x509.Cert
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if intCertsForLeafs, ok := intCerts[certID]; ok {
|
if intCertsForLeaves, ok := intCerts[certID]; ok {
|
||||||
certBundle = append(certBundle, intCertsForLeafs...)
|
certBundle = append(certBundle, intCertsForLeaves...)
|
||||||
}
|
}
|
||||||
certChainPEM, err := CertChainToPEM(certBundle)
|
certChainPEM, err := CertChainToPEM(certBundle)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -137,7 +137,7 @@ type YubiPrivateKey struct {
|
||||||
libLoader pkcs11LibLoader
|
libLoader pkcs11LibLoader
|
||||||
}
|
}
|
||||||
|
|
||||||
// YubiKeySigner wraps a YubiPrivateKey and implements the crypto.Signer interface
|
// yubikeySigner wraps a YubiPrivateKey and implements the crypto.Signer interface
|
||||||
type yubikeySigner struct {
|
type yubikeySigner struct {
|
||||||
YubiPrivateKey
|
YubiPrivateKey
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ func getECDSAKey(ctx IPKCS11Ctx, session pkcs11.SessionHandle, pkcs11KeyID []byt
|
||||||
return data.NewECDSAPublicKey(pubBytes), data.CanonicalRootRole, nil
|
return data.NewECDSAPublicKey(pubBytes), data.CanonicalRootRole, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sign returns a signature for a given signature request
|
// sign returns a signature for a given signature request
|
||||||
func sign(ctx IPKCS11Ctx, session pkcs11.SessionHandle, pkcs11KeyID []byte, passRetriever passphrase.Retriever, payload []byte) ([]byte, error) {
|
func sign(ctx IPKCS11Ctx, session pkcs11.SessionHandle, pkcs11KeyID []byte, passRetriever passphrase.Retriever, payload []byte) ([]byte, error) {
|
||||||
err := login(ctx, session, passRetriever, pkcs11.CKU_USER, UserPin)
|
err := login(ctx, session, passRetriever, pkcs11.CKU_USER, UserPin)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue