I don't think you're using the correct signature algorithm. The documentation suggests that you should probably be using SHA1withRSA as the signature algorithm. This is further indicated by the signature vs. expected. The "expected" value you give is the raw SHA-1 hash, whereas the signature you're providing is a PKCS#1 v1.5 DigestInfo (See RFC2313, section 10.1.2).

Can't verify signature in JAVA but success in .NET
Current setup:

I have a PLC that, under certain conditions, will print information to a dot-matrix printer that it is connected to.

Desired setup:

Replace the printer with a PC (which has a parallel port) that can read the data and save it to a file.

Does anybody know of any software that can accomplish this? The platform would be Windows XP.
