How to pipe binary data from Linux to Windows over ssh?

I have binary data on Linux which I need to transfer to Windows to which I have an ssh access.

The data is stored in pass thus I would prefer not to first store it to a temporary file and then transfer it over scp.

I’m looking for a one liner of the form

pass secrets/cert.pfx | ssh win_pc "??? C:/cert.pfx"

The best I could have done so far is

pass secrets/cert.pfx | ssh win_pc "$input | Out-File -FilePath c:/cert.pfx"

Which does seem to produce a binary looking c:/private.pfx file, but Windows complains that it is “invalid”.

The Windows machine has powershell version 5.1 on it.