Quantcast
Channel: edxlsharp Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 20

Commented Issue: Difficulty getting IPAWSTester to work [18634]

$
0
0
Having a lot of difficulty getting the IPAWSTester application in your EDXLSharp_Tools solution to work. I have my certificate and the cog id/user id info all correct. I can ping, and i can run your 'getmessage' methods. But the postCAP method is giving me a lot of issues.
I'm using the sample CAP data you provide in https://edxlsharp.codeplex.com/wikipage?title=CAP%20Sample%202&referringTitle=XML%20Examples
First, the XML would error out because it needs 'IPAWSv1.0' as a 'code' value. So i added that to the XML. Secondly, it errored out because it didn't like the polygon values you were using. So i just deleted those right now.

Now finally i've reached the SignXML procedure in the IPAWS_CAP12Proxy class. I error out at signedXML.ComputeSignature with the error:
{"Invalid algorithm specified.\r\n"}
See the stack trace below if it helps. Any guidance on how to move past this issue? I'm using the latest download as of today from your source code.

I see the similar issue at:
https://edxlsharp.codeplex.com/wikipage?title=IPAWS%20Help
in Q&A #3, but it doesn't seem to really provide any steps on fixing the issue. I created my cert from a .jks file , following the instructions you have at https://edxlsharp.codeplex.com/discussions/360137/. My signature algorithm is sha256RSA, and my signature has algorithm is sha256. Is there anything else this cert should have?


at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at System.Security.Cryptography.Utils.SignValue(SafeKeyHandle hKey, Int32 keyNumber, Int32 calgKey, Int32 calgHash, Byte[] hash, Int32 cbHash, ObjectHandleOnStack retSignature)
at System.Security.Cryptography.Utils.SignValue(SafeKeyHandle hKey, Int32 keyNumber, Int32 calgKey, Int32 calgHash, Byte[] hash)
at System.Security.Cryptography.RSACryptoServiceProvider.SignHash(Byte[] rgbHash, Int32 calgHash)
at System.Security.Cryptography.RSAPKCS1SignatureFormatter.CreateSignature(Byte[] rgbHash)
at System.Security.Cryptography.AsymmetricSignatureFormatter.CreateSignature(HashAlgorithm hash)
at System.Security.Cryptography.Xml.SignedXml.ComputeSignature()
at IPAWSProxyLib.IPAWS_CAP12Proxy.SignXml(XmlDocument xmlDoc) in c:\Temp\edxlsharp-94332\EDXLSharp-3.1\EDXLSharp_Tools\IPAWSProxyLib\IPAWS_CAP12Proxy.cs:line 736
Comments: ** Comment from web user: philjohnson3 **

Never mind, ended up figuring it out. Basically, the .pfx file that you get from
https://edxlsharp.codeplex.com/discussions/360137
is not good enough. What you need to do next is then create a .pem file from that .pfx file:
openssl pkcs12 -in c:\temp\IPAWSOPEN_XXXXXX.pfx -out C:\temp\IPAWSOPEN_XXXXXX.pem -nodes

and then you need to use that .pem to create a .p12 file that contains the correct settings:

openssl pkcs12 -export -in c:\temp\IPAWSOPEN_XXXXXX.pem -inkey c:\temp\IPAWSOPEN_XXXXXX.pem -CSP "Microsoft Enhanced RSA and AES Cryptographic Provider" -out c:\temp\IPAWSOPEN_XXXXXX.p12 -name "<friendly name that the .pfx file has>"

I got this from Q&A 5 in https://edxlsharp.codeplex.com/wikipage?title=IPAWS%20Help , but note that i needed to add the '-name' parameter as well to add the same friendly name that the .pfx file has, or else the tester code will error out on that section as well.

With all that done, the tester code finally works.


Viewing all articles
Browse latest Browse all 20

Trending Articles