mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-05 14:20:24 +08:00
修复证书数据可能获取不到的问题
This commit is contained in:
@@ -46,7 +46,7 @@ type SSLCertConfig struct {
|
|||||||
// Init 校验
|
// Init 校验
|
||||||
func (this *SSLCertConfig) Init(ctx context.Context) error {
|
func (this *SSLCertConfig) Init(ctx context.Context) error {
|
||||||
// 如果没有指定数据, 则从ctx中读取数据
|
// 如果没有指定数据, 则从ctx中读取数据
|
||||||
if ctx != nil && len(this.CertData) == 0 {
|
if ctx != nil && len(this.CertData) < 128 {
|
||||||
var dataMapOne = ctx.Value("DataMap")
|
var dataMapOne = ctx.Value("DataMap")
|
||||||
if dataMapOne != nil && !reflect.ValueOf(dataMapOne).IsNil() {
|
if dataMapOne != nil && !reflect.ValueOf(dataMapOne).IsNil() {
|
||||||
dataMap, ok := dataMapOne.(*shared.DataMap)
|
dataMap, ok := dataMapOne.(*shared.DataMap)
|
||||||
|
|||||||
Reference in New Issue
Block a user