Documentation ¶
Index ¶
- func DownloadClientCA() (*x509.Certificate, error)
- func GetClientCertificate(username, mitid, password string, pk *rsa.PublicKey, sk *rsa.PrivateKey) (*x509.Certificate, error)
- func NewClient(cert tls.Certificate) *http.Client
- func ParsePrivateKey(der []byte) (crypto.PrivateKey, error)
- func TouchstoneLogin(c *http.Client, dst string) error
- type PublicKeyAndChallenge
- type SignedPublicKeyAndChallenge
- type SubjectPublicKeyInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadClientCA ¶
func DownloadClientCA() (*x509.Certificate, error)
func GetClientCertificate ¶
func GetClientCertificate(username, mitid, password string, pk *rsa.PublicKey, sk *rsa.PrivateKey) (*x509.Certificate, error)
func ParsePrivateKey ¶
func ParsePrivateKey(der []byte) (crypto.PrivateKey, error)
ParsePrivateKey decodes the given private key DER block. OpenSSL 0.9.8 generates PKCS#1 private keys by default, while OpenSSL 1.0.0 generates PKCS#8 keys.
Types ¶
type PublicKeyAndChallenge ¶
type PublicKeyAndChallenge struct { SubjectPublicKeyInfo SubjectPublicKeyInfo Challenge string `asn1:"ia5"` }
type SignedPublicKeyAndChallenge ¶
type SignedPublicKeyAndChallenge struct { PublicKeyAndChallenge PublicKeyAndChallenge SignatureAlgorithm []asn1.ObjectIdentifier Signature asn1.BitString }
type SubjectPublicKeyInfo ¶
type SubjectPublicKeyInfo struct { Algo pkix.AlgorithmIdentifier BitString asn1.BitString }
Click to show internal directories.
Click to hide internal directories.