Skip to content
Snippets Groups Projects

Adding tls support for akms-ckms client and server

Merged Neil-Jocelyn Schark requested to merge akms-ckms-tls-implementation into master
4 files
+ 44
10
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -28,9 +28,9 @@ type KSAKey struct {
@@ -28,9 +28,9 @@ type KSAKey struct {
}
}
func main() {
func main() {
tlsCAFile := flag.String("ca", "ca.crt", "Path to CA certificate file")
tlsCAFile := flag.String("ca", "", "Path to CA certificate file")
tlsCertFile := flag.String("cert", "cert.crt", "Path to certificate file")
tlsCertFile := flag.String("cert", "", "Path to certificate file")
tlsKeyFile := flag.String("key", "key.key", "Path to key file")
tlsKeyFile := flag.String("key", "", "Path to key file")
flag.Parse()
flag.Parse()
logrus.Info("Starting AKMS Simulator...")
logrus.Info("Starting AKMS Simulator...")
@@ -45,7 +45,7 @@ func main() {
@@ -45,7 +45,7 @@ func main() {
Handler: router,
Handler: router,
}
}
if tlsCAFile != nil && tlsCertFile != nil && tlsKeyFile != nil {
if *tlsCAFile != "" && *tlsCertFile != "" && *tlsKeyFile != "" {
logrus.Info("TLS enabled")
logrus.Info("TLS enabled")
cp := x509.NewCertPool()
cp := x509.NewCertPool()
b, err := os.ReadFile(*tlsCAFile)
b, err := os.ReadFile(*tlsCAFile)
Loading