|
@@ -9,6 +9,7 @@ import (
|
|
"crypto/x509"
|
|
"crypto/x509"
|
|
"encoding/hex"
|
|
"encoding/hex"
|
|
"errors"
|
|
"errors"
|
|
|
|
+ "fmt"
|
|
"net/url"
|
|
"net/url"
|
|
"strconv"
|
|
"strconv"
|
|
)
|
|
)
|
|
@@ -115,11 +116,13 @@ func NewMerchantInfo(merID, certPath, keyPath, password string) (mi *MerchantInf
|
|
|
|
|
|
mi.PrivateKey, _, err = getPrivateCert(keyPath, password)
|
|
mi.PrivateKey, _, err = getPrivateCert(keyPath, password)
|
|
if err != nil {
|
|
if err != nil {
|
|
|
|
+ fmt.Println("getPrivateCert", err)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
mi.Cert, _, err = getPublicCert(certPath)
|
|
mi.Cert, _, err = getPublicCert(certPath)
|
|
if err != nil {
|
|
if err != nil {
|
|
|
|
+ fmt.Println("getPublicCert", err)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
mi.PublicKey = mi.Cert.PublicKey.(*rsa.PublicKey)
|
|
mi.PublicKey = mi.Cert.PublicKey.(*rsa.PublicKey)
|