mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 19:54:12 +08:00
Fix missing default store value
This commit is contained in:
parent
438405bbf1
commit
4f61fc20e0
@ -32,7 +32,7 @@ type Store struct {
|
|||||||
func NewStore(ctx context.Context, logger logger.Logger, options option.CertificateOptions) (*Store, error) {
|
func NewStore(ctx context.Context, logger logger.Logger, options option.CertificateOptions) (*Store, error) {
|
||||||
var systemPool *x509.CertPool
|
var systemPool *x509.CertPool
|
||||||
switch options.Store {
|
switch options.Store {
|
||||||
case C.CertificateStoreSystem:
|
case C.CertificateStoreSystem, "":
|
||||||
platformInterface := service.FromContext[platform.Interface](ctx)
|
platformInterface := service.FromContext[platform.Interface](ctx)
|
||||||
systemCertificates := platformInterface.SystemCertificates()
|
systemCertificates := platformInterface.SystemCertificates()
|
||||||
if len(systemCertificates) > 0 {
|
if len(systemCertificates) > 0 {
|
||||||
|
@ -24,7 +24,8 @@ func (o CertificateOptions) MarshalJSON() ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *CertificateOptions) UnmarshalJSON(data []byte) error {
|
func (o *CertificateOptions) UnmarshalJSON(data []byte) error {
|
||||||
if err := json.Unmarshal(data, (*_CertificateOptions)(o)); err != nil {
|
err := json.Unmarshal(data, (*_CertificateOptions)(o))
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
switch o.Store {
|
switch o.Store {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user