neoneo-go/pkg/config/rpc_config.go
Evgenii Stratonikov 90efaa4771 rpcsrv: Allow to enable mTLS
If RootCA setting is enabled in the configuration, use it to verify
client certificate.

Signed-off-by: Evgenii Stratonikov <fyfyrchik@runbox.com>
2024-06-10 11:25:01 +03:00

38 lines
1.6 KiB
Go

package config
import (
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
)
type (
// RPC is an RPC service configuration information.
RPC struct {
BasicService `yaml:",inline"`
EnableCORSWorkaround bool `yaml:"EnableCORSWorkaround"`
// MaxGasInvoke is the maximum amount of GAS which
// can be spent during an RPC call.
MaxGasInvoke fixedn.Fixed8 `yaml:"MaxGasInvoke"`
MaxIteratorResultItems int `yaml:"MaxIteratorResultItems"`
MaxFindResultItems int `yaml:"MaxFindResultItems"`
MaxFindStorageResultItems int `yaml:"MaxFindStoragePageSize"`
MaxNEP11Tokens int `yaml:"MaxNEP11Tokens"`
MaxRequestBodyBytes int `yaml:"MaxRequestBodyBytes"`
MaxRequestHeaderBytes int `yaml:"MaxRequestHeaderBytes"`
MaxWebSocketClients int `yaml:"MaxWebSocketClients"`
SessionEnabled bool `yaml:"SessionEnabled"`
SessionExpirationTime int `yaml:"SessionExpirationTime"`
SessionBackedByMPT bool `yaml:"SessionBackedByMPT"`
SessionPoolSize int `yaml:"SessionPoolSize"`
StartWhenSynchronized bool `yaml:"StartWhenSynchronized"`
TLSConfig TLS `yaml:"TLSConfig"`
}
// TLS describes SSL/TLS configuration.
TLS struct {
BasicService `yaml:",inline"`
RootCA []string `yaml:"RootCAs"`
InsecureSkipVerify bool `yaml:"InsecureSkipVerify"`
CertFile string `yaml:"CertFile"`
KeyFile string `yaml:"KeyFile"`
}
)