Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertDN ¶
func CertDN(cert *x509.Certificate) string
CertDN returns the Subject Distinguished Name of a certificate as a human-readable string. Uses the standard Go x509 String() format. For comparison purposes, use certCanonicalDN instead.
func CertFingerprint ¶
func CertFingerprint(cert *x509.Certificate) string
CertFingerprint calculates the SHA256 fingerprint of a certificate. Returns the fingerprint as a lowercase hex string.
func FormatFingerprint ¶
FormatFingerprint formats a fingerprint with colons for display (e.g., "aa:bb:cc:dd...")
func NewClientConn ¶
func NewClientConn(cfg model.GRPCClientTLS) (*grpc.ClientConn, error)
NewClientConn creates a gRPC client connection with optional mTLS support. If TLS is disabled, returns an insecure connection. If TLS is enabled without client certs, uses server-only TLS. If TLS is enabled with client certs, uses mutual TLS (mTLS).
func NewServerOptions ¶
func NewServerOptions(cfg model.GRPCServer) ([]grpc.ServerOption, error)
NewServerOptions returns gRPC server options with optional TLS/mTLS support. If TLS is disabled, returns nil (for insecure server). If TLS is enabled without client CA, uses server-only TLS. If TLS is enabled with client CA, uses mutual TLS (mTLS) requiring client certificates. If AllowedClientFingerprints or AllowedClientDNs is set, adds an interceptor to verify client certs.
Types ¶
This section is empty.