windowsbashcmdopensslgoogle-pay

Error Executing OpenSSL Commands in Windows for Google Pay Integration: Path Not Found


I'm working on integrating Google Pay and need to generate a public key from a PEM file using OpenSSL commands. My environment is Windows 10, and I'm encountering issues adapting commands typically used in a Unix/Linux environment.

Here's the command I tried:

cmd
C:\Users\rodri>openssl ec -in key.pem -pubout -text -noout 2> /dev/null | grep "pub:" -A5 | sed 1d | xxd -r -p | base64 | paste -sd "\0" -

I attempted to modify it for Windows, but received various errors, including

"The system cannot find the path specified"

and

"'xxd' is not recognized as an internal or external command".

Could someone guide how to correctly execute these steps in Windows? Or suggest an alternative approach to generate the public key in the required format for Google Pay integration?

Thank you for any assistance you can offer!


Solution

  • Seemingly, you are trying to run a Linux based series of commands in a Windows based terminal.

    You'll need to either run this inside WSL, or adjust the command to do the same exact output, but without using Linux based paths like /dev/null or commands like grep or sed.