Re:Help with verifying the signature of enveloped -message using x509 certificates.

Re:Help with verifying the signature of enveloped -message using x509 
certificates.

Hey Friends,
I have an xml given by our partner trying to integrating with us and i have 
their certificate with public key installed in both personal and trusted 
people folders.
when i am using the following code to check the signature of message signed 
by my certificate i am able to verify the signature but when i am trying to 
check the signature of the message of our partner using the same following 
code i am not able to verify the message. the message sent by our partner is 
right below the code.I would even be intrested in giving the public 
certificate of the partner if anyone intrested in helping me out in finding 
the bug.
I would be thankful if someone can reply to me what am i missing here.
XmlDocument aobDocument = new XmlDocument();

aobDocument.PreserveWhitespace = true;

aobDocument.Load(System.Web.HttpContext.Current.Server.MapPath("ReadSample/SampleMessengerCD.xml"));

X509Certificate2 FoundCert = RetrieveCertificate();//This method gets me the 
certificate of the partner we are integrating with i have checked the method 
and retrieves the proper certificate from the certificate store.

SignedXML SignedXML = new 
SignedXML(aobDocument);//((XmlDocument)(soapEnv)));

XmlNode dsig = aobDocument.GetElementsByTagName("Signature",

SignedXml.XmlDsigNamespaceUrl)[0];

SignedXML.LoadXml((XmlElement)dsig);

if (SignedXML.CheckSignature(FoundCert, false))   //FoundCert is the 
certificate of the partner thatz being retirieved from the store.

{

// Signature verified.

return true;

}

else

{

//Signature verification failed.

return false;

}







  <?xml version="1.0" encoding="UTF-8" ?>
- <B:Envelope xmlns:B="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:A="http://www.routeone.com/namespace.messaging.diag#" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <SOAP:Header 
xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" 
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-SEC:Signature SOAP:mustUnderstand="1">
- <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" 
xmlns:C="http://www.routeone.com/namespace.messaging.CreditApplication#" 
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">
- <SignedInfo>
  <CanonicalizationMethod 
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
  <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
- <Reference URI="#Body">
- <Transforms>
  <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
  </Transforms>
  <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
  <DigestValue>niQfM6RR1CP+V1Puf9FlaXRNcFQ=</DigestValue>
  </Reference>
  </SignedInfo>
  <SignatureValue>Ii68Od4N0zOe+UwJyBDe1aQlC1YbteOk4YNjyOal9m6f7KbO4SqPdaX4CJZIIt1Z5f7iOgzhK6nuCi08RPyqXPvdeuivNNOq6/4a7iJZxQD2PMAFBVAVwAuLmIRAh0u6MkzA/u0069JvP90mOpYtG1euXf5oSKI+XCmdSKIBjv5FNmg9XTaruy2cg3Iz+KOUInMPnG7AJcmJRnaLLr/5za6Bu1CgpeS0/aBVhf2xpF7/A9qa/sjiQR2dfwPM+InawXV94SD8HEd6QFzfE5WxrWLkVXOBeiCyNvYXX9CTcmPQFUnvVxA1+L9TMx4reb835ZT0Hi2aP2hu7PQiWAaFdw==</SignatureValue>
- <KeyInfo>
- <X509Data>
  <X509Certificate />
- <X509IssuerSerial>
  <X509IssuerName>OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 
VeriSign, OU=VeriSign International Server CA - Class 3, OU="VeriSign, 
Inc.", O=VeriSign Trust Network</X509IssuerName>
  <X509SerialNumber>160283950701092051351433675048676869301</X509SerialNumber>
  </X509IssuerSerial>
  </X509Data>
  </KeyInfo>
  </Signature>
  </SOAP-SEC:Signature>
  </SOAP:Header>
- <B:Body id="Body" 
xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" 
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
- <A:Diagnostic>
- <A:DiagnosticMessage>
  <A:RequestMessage>100027</A:RequestMessage>
  </A:DiagnosticMessage>
  <A:SourceIdentifier>RouteOne</A:SourceIdentifier>
  </A:Diagnostic>
  </B:Body>
  </B:Envelope> 


0
param (22)
12/2/2006 4:05:22 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
510 Views

Similar Articles

[PageSpeed] 3

Reply:

Similar Artilces:

Can I delete a file that is in use
I have a malocious file called sdra64.exe it's in my appdata\roaming folder I can't delete it because it isays it s in use by another program How can I set it up so that it is deleted somehow? Thanks I have a malocious file called sdra64.exe it's in my appdata\roaming folder I can't delete it because it isays it s in use by another program How can I set it up so that it is deleted somehow? Thanks You can try using the task manager. Bring up the manager and go to processes and stop it from running. You can try to delete from Safe Mo...

Re: Outlook 2007 create background
I played around with this further. You can still use any HTML editor to = create stationery and place it in the user's Stationery folder. You can = also use FrontPage 2003 to create new themes with background images. = Details at = http://turtleflock-ol2007.spaces.live.com/blog/cns!C1013F1F9A99E3D8!230.e= ntry --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =...

Replying to Individual in Newsgroup using Outlook, with O.E. as NG reader
I'm using Outlook 2000 sp1 for E-mailing. It's set-up to use Outlook Express 6 as the newsgroup reader (whilst calling itself Outlook Newsreader). I recently wanted to reply to an individual in a thread. Everything seemed to go okay until I checked the 'Sent Items' of Outlook. There was an E-mail to the individual, but none of the text that I'd included was there, only the original newsgroup message. Does anybody know what's going on, how to fix it, or has anybody got any suggestions ? Thanks in Advance Duncan Anderson O/S = Win X/P home sp1 I think this happens be...

What's the correct procedure to use a CBitmapButton in a dialog (to avoid resouce leaking)?
Hi, I have a CBitmapButton member in a dialog. The problem is that, after exiting my program, there is a cross button staying on my windows 2000's desktop now. The button is exactly the one I used in the dialog. Clicking on it doesn't do anyting. Rebooting the machine doesn't help. The application has been mailed to many customers. Now I expect they'll see this button on their machine but hardly guess that it's caused by my program. In DoDataExchange(), I associate the CBitmapButton member with a push button in the dialog's template. Then in OnInitDialog...

External Link-help!
Hi there, I am trying to get rid of an external link to my excel spreadsheet that I created. When I email the excel file to a coworker, the file asks to update links. But, I want to get rid of all the links so that when others open it, the message will not come up. Under the Edit menu, the Links option is not highlighted. Somehow, the external link got embedded into the file, and I need a solution to delete it out. My job is depending on this resolution! Thanks, Tina I could really use some help! Try Bill Manville's addin. It'll find those pesky ones. Findlink.zip ...

!!HELP!! OWA ans Outlook do not synch
OK so I rebuilt my SBS 2003 server and used Exmerge to exmerge all my users mailboxes out. Successfully exmerged them back into Exchange. Had to recreate new profiles on the users workstations but all appears to be good. One slight problem. For my external users who use Citrix and log onto the Citrix server desktop they cannot use Outlook there. I do have a case open with Microsoft regarding this issue however my immediate issue to resolve is why I can log on as a user here in the office, open Outlook and all their mail is there. However when I use OWA the mailbox is incomplete. Does no...

forgot password?please help
I FORGOT MY PASSWORD ON MY MICROSOFT MONEY 2000 BUSINESS - PERSONAL I TRYED EVERY NAME AND NUMBER FOR 2 DAYS tsger@aol.com wrote: > I FORGOT MY PASSWORD ON MY MICROSOFT MONEY 2000 BUSINESS - > PERSONAL I TRYED EVERY NAME AND NUMBER FOR 2 DAYS That's got to be VERY FRUSTRATING! Not only that, but your CAPS LOCK KEY is stuck! I'm sorry for you! ...

Error when using RMS EDC Settle function
Hello. We run RMSsp2, and use PCCharge PaymntSvr EDC software/First Data processor. PCCharge settles fine, if trying from within RMS, receive error on: 1st attempt: "Invalid Merchant" box error appears. 2nd and subsequent attempts "Invalid Destination Zip" box error appears. Erro occurs withing few seconds of settle attempt, settle progress doesnt go beyond 1/10 of progress meter and this error pops up. Any ideas? Our EDC config is fine and all batches and items are ok in PCCharge. thanks luke ...

Unable to attach an attachment using mail merge
Anyone know how to do an Outlook mail merge and have it sent an attachment to all merged recipents? I put the attachment into the basic outlook e_mail message and when it merges it strips off the attachment. I am using Word as the E-Mail editor and Outlook 2002 SP2 and merging contacts directly from an Outlook Contact folder. ...

need a bit of help.....
I have generated a form that shows money amounts. yet i want two colums that separates the dollar amount from cents. I have for example colum *H* as the dollar amount and colum *I* as the cent amounts. Now i have tried Format Cell to set it up but it doesnt work. for example i tried the custom format for the dollar amount and it rounds it. and if there's an amount of 1108.83 the cell will show 1109. so it does not show the true value amount. i also tried the same approach with the =RIGHT(H1,2) but with the left and Mid but still didnt work, because i would have to enter the same amount o...

Help! page range prob in print
Hi I worked on print.Everythings working perfectly except one problem.ie. When i set the PageRange option to 'ALL' option and press print button..instead of displaying only the pages which has information ..its displaying that all pages from 1 to 65535 r going to be printed. How do i remove this problem? thanks, vani I thing you may failed to set the maximum number of pages to print. Check CPrintInfo::SetMaxPage(nMaxPage); method regds Jibesh -- ------------------------------------------------------------------------- FIGHT BACK AGAINST SPAM! Download Spam Inspecto...

MSP 2007 resources help
Hi all, Three questions: 1. What the constraint A<B,C means and how can I entering in the MSP? 2. I have 3 kinds of human resources. Lets say for example, kind A are engineers. I have 8 of them and everyone is costing 1500 Euros/month. Task A needs 4 engineers. How can I assign them to the task and add the appropriate cost? 3. I have 3 machines as a resource. Each machine has a usage cost of 3000 euros per task and function cost 2400 euros per month. How can I assign them in the appropriate tasks? And how can I distribute their cost? Thank you in advance -- - Hello...

Link Help!!!
hi, How can I add or remove link from “My Work” under workplace, like Calendar or Reports...? And where the file sitelog.xml?? thnx, ...

How to use MFC Cstring class in Win32 DLL?
Hello all I am having WIN32 DLL and i have to use CString in it. I tried include <Afx.h> with project setting with both 'use MFC in a static library' as well as 'use MFC in a shared library' option of project setting but firstly i got error fatal error C1189: #error : WINDOWS.H already then i commented #include<windows.h> after that i am getting linking error mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in testdll.obj Debug/testdll.dll : fatal error LNK1169: one or more multiply defined symbols found i tried other options like includi...

Prevent auto recoloring of chart when using Pivot Table data
I have crated a Pivot tabel with data I want to show in a Chart. My problem is when I refresh data the colours of the "data series" changes. For exaple I want one of my series "OK" always be shown in green colour, but after a refresh of pivot all colours changes. This problem is not only colouring. If I have made changes to my chart so that one series ar plotted on a secondary axis, and I change it to another chart type (e.g. the secondary should be shown as a line instead of column) this also changes when refreshing the data. Most irritating! Anyone that knows how to p...

recieving reminders since re load of exchange 2000
I have recently done a reinstall of exchange 2000 using setup and selecting reinstall all components. Before doing this I did an offline backup of mdbdata. After reinstall moved backed up mdbdata back. All is working okay all emails and public folders are as before. However a few users are complaining that they are recieving reminders from months ago. Any ideas all I can see is the outlook.exe /cleanreminders to fix it. Andrew ...

uninstall from command line using alternate credentials
WinXP SP3. Is there a way to do this? I am trying to find a way for a power user to uninstall a program using the msiexec + uninstall string from the registry using admin account credentials. Alternativly, I have tried to get the user to do a "run as" on the appwiz.cpl file but I get an error. UPDATE: also tried making a shortcut and running as admin but there is still an error with starting the msiexec. It says something like error statring program, it may be disabled or have no associated programs. I checked the windows installer service and it is running. ...

Updating a form after using a workflow rule to update the entity.
I have a workflow rule that, on create of a contact, calls an assembly and updates an attribute of that assembly. It works a treat, but after saving, the attribute does not appear in the form. I have to close and re-open the contact to see the attribute. Is there any way to have this display immediately? Thanks Saira ...

Using Microsoft Map in Office XP
How can I add the add-in Microsoft Map to work in Office XP? Thank you for looking. John John MS Map not available with versions 2002 and 2003. MS Map Point is now the application used. Costs about $250.00 US. An alternate is to use MapInfo product(which was the Excel 97 and 2000 product). Very costly at minimum $595.00 US just for upgrade. http://www.mapinfo.com/location/integration But............found this tidbit on the net thanks to Debra Dalgleish. Mystery of the Missing Map Tool: If you believe Microsoft, the Excel Map tool is permanently out of action in Offi...

trendline HELP!
I have a chart that i am making of PPMs for the year of 2006. I have jan-may in the data series and the rest are left blank. I am trying to get a trendline in where it will stop at whatever month I am at but update when a new month's data is entered into the box. However, I cannot figure out how to do this, when I do have a trend line it goes to like -4000. can anyone help me please? Make a dynamic chart: http://peltiertech.com/Excel/Charts/Dynamics.html http://www.tushar-mehta.com/excel/newsgroups/dynamic_charts/index.html http://www.stfx.ca/people/bliengme/ExcelTips/Dynamic.htm...

Help what kind of formula?
I've used Excel formulas in a basic way (sums, averages, divisions, and multiplication of cell data) for about a year. I came across this formula today for a project I need to complete. I've never seen the "SUMIF" or the dollar symbol, OR the ampersand! After hilighting the formula to see if I could just figure it out, I'm stumped. Any chance someone could explain what function these symbols serve Here is the formula =SUMIF($D$3:$D$28,"="&$C38,H$3:H$28) :confused: -- Emil0 ------------------------------------------------------------------------ Emil...

Was this post helpful to you?
Hi gang, Just curious about the Yes, No selection on the question, "Was this post helpful to you? " In a case where I posted a question and received numerous helpful responses, which collectively provided the final solution, do I select Yes for each response that was helpful, or just select Yes on the very last post when the topic has ended? Thanks Peter On Sun, 12 Aug 2007 13:44:01 -0700, Petermgr <Petermgr@discussions.microsoft.com> wrote: >Hi gang, > >Just curious about the Yes, No selection on the question, "Was this post >helpful to you? "...

Need help from fellow Admin about Mailbox sizes
I need a little help from some fellow Admins that have successfully created some policies about mailbox limits. Currently I am fighting the small company mentality in a growing company. We have about 150-200 mailboxes and I am looking for some suggestions on at what size is a good idea to start the warning messages, then stop send and then stop all traffic. I have some users that are getting to the 2GB size. What do you guys suggest? Thanks in advance. There is no standard or best practice for quota settings except that you should set a limit, even if a high one, for "Prohibi...

Default workbook not coming up help
The workbook I have made is in Excel startup folder and used to come u on launch and file, new or command new. Now only comes up on relaunch and command N, brings up a default workbook. Any ideas appreciated thanks -- Message posted from http://www.ExcelForum.com ...

Function Help?
I need a function that will count back all previous rows for th farthest digit back in the R, S and T cells and place it in the column. The furthest digit back: each of the 3 cells being evaluated ( S and T) have single digit values which have occurred in previous R, T cells, but the value which last appeared in the earliest row is th value which the furthest back. I want the function to count how man rows since the last time that value last occurred. See sample below the N column has the correct answers: Example: .................R..S...T........N row 11:....9...0...6 row 12:....7...5.....