first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package mmtls
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"xiawan/wx/clientsdk/baseutils"
|
||||
)
|
||||
|
||||
// ShowMMTLSExtensions 打印Extensions
|
||||
func ShowMMTLSExtensions(extensionList []*Extension) {
|
||||
fmt.Println("--------------- ShowMMTLSExtensions in ---------------")
|
||||
extensionLength := len(extensionList)
|
||||
for index := 0; index < extensionLength; index++ {
|
||||
// PreSharedKeyExtensionType
|
||||
if extensionList[index].ExtensionType == PreSharedKeyExtensionType {
|
||||
tmpExtension, _ := PreSharedKeyExtensionDeSerialize(extensionList[index].ExtensionData)
|
||||
baseutils.ShowObjectValue(tmpExtension)
|
||||
}
|
||||
|
||||
// ClientKeyShareType
|
||||
if extensionList[index].ExtensionType == ClientKeyShareType {
|
||||
tmpExtension, _ := ClientKeyShareExtensionDeSerialize(extensionList[index].ExtensionData)
|
||||
baseutils.ShowObjectValue(tmpExtension)
|
||||
}
|
||||
|
||||
// ServerKeyShareType
|
||||
if extensionList[index].ExtensionType == ServerKeyShareType {
|
||||
tmpExtension, _ := ServerKeyShareExtensionDeSerialize(extensionList[index].ExtensionData)
|
||||
baseutils.ShowObjectValue(tmpExtension)
|
||||
}
|
||||
}
|
||||
fmt.Println("--------------- ShowMMTLSExtensions out ---------------")
|
||||
}
|
||||
Reference in New Issue
Block a user