func ReadIdentity(dataDir string, id IdentityID) (i *Identity, err error) {
	kp, cp := keysPath(dataDir, id)
	log.Debugf("host identity: [key: %v, cert: %v]", kp, cp)

	keyBytes, err := utils.ReadPath(kp)
	if err != nil {
		return nil, trace.Wrap(err)
	}

	certBytes, err := utils.ReadPath(cp)
	if err != nil {
		return nil, trace.Wrap(err)
	}

	return ReadIdentityFromKeyPair(keyBytes, certBytes)
}
// ReadIdentity reads, parses and returns the given pub/pri key + cert from the
// key storage (dataDir).
ReadIdentity reads, parses and returns the given pub/pri key + cert from the
key storage (dataDir).
// ReadIdentity reads parses and returns the given pub / pri key + cert from the // key storage ( dataDir ) .
func ReadIdentity(dataDir string, id IdentityID) (i *Identity, err error) {
	kp, cp := keysPath(dataDir, id)
	log.Debugf("host identity: [key: %v, cert: %v]", kp, cp)
	keyBytes, err := utils.ReadPath(kp)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	certBytes, err := utils.ReadPath(cp)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return ReadIdentityFromKeyPair(keyBytes, certBytes)
}
func ReadIdentity ( dataDir string , id IdentityID ) ( i * Identity , err error ) { kp , cp := keysPath ( dataDir , id ) log . Debugf ( " " , kp , cp ) keyBytes , err := utils . ReadPath ( kp ) if err != nil { return nil , trace . Wrap ( err ) } certBytes , err := utils . ReadPath ( cp ) if err != nil { return nil , trace . Wrap ( err ) } return ReadIdentityFromKeyPair ( keyBytes , certBytes ) }
ReadIdentity reads, parses and returns the given pub/pri key + cert from the
key storage (dataDir).
ReadIdentity reads parses and returns the given pub / pri key + cert from the key storage ( dataDir ) .