Documentation ¶
Index ¶
- func CheckIfSubjectEquals(t *testing.T, expectedSubject string, certificate *x509.Certificate)
- func CreateCsr(t *testing.T, certInfo CertInfo, keys *rsa.PrivateKey) []byte
- func CreateKey(t *testing.T) *rsa.PrivateKey
- func CrtResponseToPemBytes(t *testing.T, certResponse *CrtResponse) []byte
- func DecodeAndParseCert(t *testing.T, crtResponse *CrtResponse) *x509.Certificate
- func EncodeBase64(src []byte) string
- type ApiInfo
- type CertInfo
- type ConnectorClient
- type CrtResponse
- type CsrRequest
- type Error
- type ErrorResponse
- type InfoResponse
- type TestConfig
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfSubjectEquals ¶
func CheckIfSubjectEquals(t *testing.T, expectedSubject string, certificate *x509.Certificate)
CheckIfSubjectEquals verifies that specified subject is equal to this in certificate
func CrtResponseToPemBytes ¶
func CrtResponseToPemBytes(t *testing.T, certResponse *CrtResponse) []byte
CrtResponseToPemBytes decodes certificate form CrtResponse and return pemBlock.Bytes
func DecodeAndParseCert ¶
func DecodeAndParseCert(t *testing.T, crtResponse *CrtResponse) *x509.Certificate
DecodeAndParseCert decodes base64 encoded certificate and parses it
func EncodeBase64 ¶
Types ¶
type ConnectorClient ¶
type ConnectorClient interface { CreateToken(t *testing.T) TokenResponse GetInfo(t *testing.T, url string) (*InfoResponse, *Error) CreateClientCert(t *testing.T, csr, url string) (*CrtResponse, *Error) }
func NewConnectorClient ¶
func NewConnectorClient(remoteEnv, internalAPIUrl, externalAPIUrl string) ConnectorClient
type CrtResponse ¶
type CrtResponse struct {
Crt string `json:"crt"`
}
type CsrRequest ¶
type CsrRequest struct {
Csr string `json:"csr"`
}
type Error ¶
type Error struct { StatusCode int ErrorResponse ErrorResponse }
type ErrorResponse ¶
type InfoResponse ¶
type TestConfig ¶
func ReadConfig ¶
func ReadConfig() (TestConfig, error)
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.