mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-05 20:58:28 +02:00
handle buypass issuer not match
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CA Defination, load from embeded json when startup
|
// CA Defination, load from embeded json when startup
|
||||||
@@ -36,9 +37,15 @@ func init() {
|
|||||||
|
|
||||||
// Get the CA ACME server endpoint and error if not found
|
// Get the CA ACME server endpoint and error if not found
|
||||||
func loadCAApiServerFromName(caName string) (string, error) {
|
func loadCAApiServerFromName(caName string) (string, error) {
|
||||||
|
// handle BuyPass cert org section (Buypass AS-983163327)
|
||||||
|
if strings.HasPrefix(caName, "Buypass AS") {
|
||||||
|
caName = "Buypass"
|
||||||
|
}
|
||||||
|
|
||||||
val, ok := caDef.Production[caName]
|
val, ok := caDef.Production[caName]
|
||||||
if !ok {
|
if !ok {
|
||||||
return "", errors.New("This CA is not supported")
|
return "", errors.New("This CA is not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
return val, nil
|
return val, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user