A quick update:
We’ve been able to get it working, using a HTTP Worker object, and a command line call to openSSL. There’s an Authorisation header that contains the URL of the request and a number of other fields. This is then signed using RSA-SHA1 and sent as part of the request.
This is our two lines of code that do the magic:
Calculate vsScript as con('cmd ',kDq,'/c ',kDq,kDq,isOpenSSLPath,kDq,' dgst -sha1 -sign ',kDq,vsKeyFile,kDq,' ',kDq,vsSrcFile,kDq,' | ',kDq,isOpenSSLPath,kDq,' base64 -A',kDq,kDq)
Launch program [vsScript] Returns vsSignature (Do not quit Omnis)
It basically does the following on the command line:
/path/to/openssl.exe dgst -sha1 -sign "/path/to/key/file" "/path/to/request" | "/path/to/openssl.exe" base64 -A
I don’t think this is a good long-term solution, because we’d be constantly opening a command window to run the signing/base64 conversion
I believe that Python has a lib that will allow us to do the same thing, but I have no idea how to call it from within Omnis.
Has anyone tried to sign something using RSA-SHA1 in Omnis? How do you do it?
Perhaps while you’re at EurOmnis, someone can figure out a quick and dirty hack for us!!
A man rushed into the doctor’s office and shouted, “Doctor! I think I’m shrinking!”
The doctor calmly responded, “Now, settle down. You’ll just have to be a little patient.”
Paul W. Mulroney
We Don't Do Simple Pty Ltd
ACN 161 009 374
Bentley Western Australia 6102