code: func TryLoadKeyFromDisk(pkiPath, name string) (crypto.Signer, error) {
  	privateKeyPath := pathForKey(pkiPath, name)
  
  	// Parse the private key from a file
  	privKey, err := keyutil.PrivateKeyFromFile(privateKeyPath)
  	if err != nil {
  		return nil, errors.Wrapf(err, "couldn't load the private key file %s", privateKeyPath)
  	}
  
  	// Allow RSA and ECDSA formats only
  	var key crypto.Signer
  	switch k := privKey.(type) {
  	case *rsa.PrivateKey:
  		key = k
  	case *ecdsa.PrivateKey:
  		key = k
  	default:
  		return nil, errors.Errorf("the private key file %s is neither in RSA nor ECDSA format", privateKeyPath)
  	}
  
  	return key, nil
  }
docs: // TryLoadKeyFromDisk tries to load the key from the disk and validates that it is valid