mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-06 07:37:21 +02:00
handle buypass issuer not match
This commit is contained in:
parent
c6c523e005
commit
8a5004e828
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user