We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/weibaohui/k8m'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
package utils
import (
"crypto/x509"
"encoding/pem"
)
// ParseCertificate 判断证书类型 进行解析
func ParseCertificate(data []byte) (*x509.Certificate, error) {
// 1. 尝试解析 PEM 格式
block, _ := pem.Decode(data)
if block != nil {
data = block.Bytes
}
cert, err := x509.ParseCertificate(data)
if err != nil {
return nil, err
}
return cert, nil
}