func ReadPrivateKeyFile(file, password string) (crypto.Signer, error) {
	if password == "" {
		return nil, fmt.Errorf("pemfile: empty password for file %q", file)
	}
	keyPEM, err := ioutil.ReadFile(file)
	if err != nil {
		return nil, fmt.Errorf("pemfile: error reading file %q: %v", file, err)
	}
	k, err := UnmarshalPrivateKey(string(keyPEM), password)
	if err != nil {
		return nil, fmt.Errorf("pemfile: error decoding private key from file %q: %v", file, err)
	}
	return k, nil
}
ReadPrivateKeyFile reads a PEM-encoded private key from a file.
The key must be protected by a password.
package pem
import (
	"context"
	"crypto"
	"crypto/x509"
	"encoding/pem"
	"errors"
	"fmt"
	"io/ioutil"
	"github.com/google/trillian/crypto/keys/der"
	"github.com/google/trillian/crypto/keyspb"
	"google.golang.org/protobuf/proto"
)