Skip to content

Commit 27d2cea

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
style: add InsecureSkipVerify comment and config-dir flag description
1 parent b8dc0c7 commit 27d2cea

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cmd/jnimcp/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func init() {
4949
rootCmd.Flags().StringVar(&flagCert, "cert", "", "client certificate PEM file (for mTLS)")
5050
rootCmd.Flags().StringVar(&flagKey, "key", "", "client private key PEM file (for mTLS)")
5151
rootCmd.Flags().StringVar(&flagCA, "ca", "", "CA certificate PEM file (for mTLS)")
52-
rootCmd.Flags().StringVar(&flagConfigDir, "config-dir", "", "certificate storage directory")
52+
rootCmd.Flags().StringVar(&flagConfigDir, "config-dir", "", "certificate storage directory (used by auto-enrollment, default ~/.config/jnimcp)")
5353
rootCmd.Flags().BoolVar(&flagInsecure, "insecure", false, "skip TLS server certificate verification")
5454
}
5555

@@ -128,6 +128,9 @@ func dialGRPC() (*grpc.ClientConn, error) {
128128
}
129129
opts = append(opts, grpc.WithTransportCredentials(tlsCreds))
130130
case flagInsecure:
131+
// TLS with InsecureSkipVerify — connects over TLS but does not verify
132+
// the server certificate. Required for self-signed CA (jniservice
133+
// generates its own CA). This is NOT plaintext.
131134
opts = append(opts, grpc.WithTransportCredentials(credentials.NewTLS(
132135
&tls.Config{InsecureSkipVerify: true})))
133136
default:

0 commit comments

Comments
 (0)