mit

package module
v0.0.0-...-45a5b63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2015 License: GPL-3.0 Imports: 18 Imported by: 0

README

# http://golang.org/doc/install
go get github.com/andres-erbsen/mit/{rsa-keygen,getcert,evals/evals}
rsa-keygen mit.sk
env MIT_USER=kerberos MIT_ID=123456789 MIT_PASSWORD=password getcert mit.sk > mit.cert
env MIT_SK=mit.sk MIT_CERT=mit.cert evals -subject=6.01

Documentation

Index

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 NewClient

func NewClient(cert tls.Certificate) *http.Client

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.

func TouchstoneLogin

func TouchstoneLogin(c *http.Client, dst string) error

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL