code: func ParsePrivateKeyPEM(keyPEM []byte) (key crypto.Signer, err error) {
  	keyDER, _ := pem.Decode(keyPEM)
  	if keyDER == nil {
  		return nil, err
  	}
  
  	generalKey, err := x509.ParsePKCS8PrivateKey(keyDER.Bytes)
  	if err != nil {
  		generalKey, err = x509.ParsePKCS1PrivateKey(keyDER.Bytes)
  		if err != nil {
  			generalKey, err = x509.ParseECPrivateKey(keyDER.Bytes)
  			if err != nil {
  				// We don't include the actual error into
  				// the final error. The reason might be
  				// we don't want to leak any info about
  				// the private key.
  				return nil, fmt.Errorf("No successful private key decoder")
  			}
  		}
  	}
  
  	switch generalKey.(type) {
  	case *rsa.PrivateKey:
  		return generalKey.(*rsa.PrivateKey), nil
  	case *ecdsa.PrivateKey:
  		return generalKey.(*ecdsa.PrivateKey), nil
  	}
  
  	// should never reach here
  	return nil, fmt.Errorf("Should be unreachable")
  }
docs: // ParsePrivateKeyDER parses a PKCS #1, PKCS #8, or elliptic curve
  // PEM-encoded private key.
  // XXX: Inlined from github.com/cloudflare/cfssl because of build issues with that module