Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Adding client usage extension for server cert (#305)
Browse files Browse the repository at this point in the history
Signed-off-by: mmerrill3 <[email protected]>
  • Loading branch information
mmerrill3 committed Mar 18, 2020
1 parent cd09bd6 commit 2470811
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/etcd/pki.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (p *etcdProcess) createKeypairs(peersCA *pki.Keypair, clientsCA *pki.Keypai

certConfig := certutil.Config{
CommonName: me.Name,
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth},
}

if err := addAltNames(&certConfig, me.ClientUrls); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tlsconfig/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func GRPCServerConfig(keypairs *pki.Keypairs, myPeerID string) (*tls.Config, err

config := certutil.Config{
CommonName: "etcd-manager-server-" + myPeerID,
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth},
}

keypair, err := keypairs.EnsureKeypair("etcd-manager-server-"+myPeerID, config, ca)
Expand Down

0 comments on commit 2470811

Please sign in to comment.