mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 11:44:13 +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) {
|
||||
var systemPool *x509.CertPool
|
||||
switch options.Store {
|
||||
case C.CertificateStoreSystem:
|
||||
case C.CertificateStoreSystem, "":
|
||||
platformInterface := service.FromContext[platform.Interface](ctx)
|
||||
systemCertificates := platformInterface.SystemCertificates()
|
||||
if len(systemCertificates) > 0 {
|
||||
|
@ -24,7 +24,8 @@ func (o CertificateOptions) MarshalJSON() ([]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
|
||||
}
|
||||
switch o.Store {
|
||||
|
Loading…
x
Reference in New Issue
Block a user