code: func GetKeyDERFromPEM(in []byte, password []byte) ([]byte, error) {
  	keyDER, _ := pem.Decode(in)
  	if keyDER != nil {
  		if procType, ok := keyDER.Headers["Proc-Type"]; ok {
  			if strings.Contains(procType, "ENCRYPTED") {
  				if password != nil {
  					return x509.DecryptPEMBlock(keyDER, password)
  				}
  				return nil, cferr.New(cferr.PrivateKeyError, cferr.Encrypted)
  			}
  		}
  		return keyDER.Bytes, nil
  	}
  
  	return nil, cferr.New(cferr.PrivateKeyError, cferr.DecodeFailed)
  }
docs: // GetKeyDERFromPEM parses a PEM-encoded private key and returns DER-format key bytes.