[Mono-dev] Verifying XML Sign
Atsushi Eno
atsushi at ximian.com
Wed Feb 28 07:07:24 EST 2007
Hi,
The sample code I put runs on .NET 1.x if you use Mono.Security.dll
which could be used under .NET 1.x too. On the other hand,
X509Certificate2 is sure, only 2.0 thing, but I just use it as a
shortcut to retrieve AsymmetricAlgorithms from certificates.
Atsushi Eno
APS wrote:
> Trying to understand....maybe I found my problem.
> I develop using vs2003 and framework 1.1 so X509Certificate2 doesn't exists.
> I have a look at the testcase, it says that "
>
> MS doesn't extract
> the public key out of the certificates ..."
>
> referring to the same MSDN article I was talking, so it creates a
>
> Mono.Security.X509.X509Certificate using rawdata from a
> System.Security.Cryptography.X509Certificates.X509Certificate and than
> it CheckSignature on that object.
> I'm wrong if I say that I cannot use namespaces from m$ 1.1 framework to
> verify with certificates and to make it work in linux/mono? I've to use
> 2.0 objects or mono objects right?
> Thanks for helping
>
> At 11.40 28/02/2007, Atsushi Eno wrote:
>> Hi,
>>
>> You don't need CryptoAPI. You can use
>> CheckSignature(AsymmetricAlgorithm) with the certificate's key (In
>> X509Certificate2, .PublicKey.Key or .PrivateKey.)
>>
>> We have standalone test case for X509 support:
>> http://svn.myrealbox.com/source/trunk/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs
>>
>>
>> Atsushi Eno
>>
>> APS wrote:
>>> You're right but I need to use a .cer file to verify the signature
>>> and looking at this article http://support.microsoft.com/kb/320602 it
>>> seems that I must use cryptoapi to extract the key to pass at the
>>> verifysign method.
>>> At 10.55 28/02/2007, Atsushi Eno wrote:
>>>> Hi,
>>>>
>>>> You can sign and verify XML signatures without WSE.
>>>> System.Security.Cryptography.Xml.SignedXml and relevant classes are
>>>> implemented in Mono too.
>>>>
>>>> Atsushi Eno
>>>>
>>>> APS wrote:
>>>>> Hi guys,
>>>>> how to verify xml signature in mono? http://www.w3.org/TR/xmldsig-core/
>>>>> I've read docs for .net and it includes adding webservice2 assemblies
>>>>> to machine.config (to support new namespaces) and using windows API
>>>>> for accessing signer certificates data.
>>>>> How can I do it in mono? There's this possibility?
>>>>> Thanks in advance
>>>>>
>>>>> _______________________________________________
>>>>> Mono-devel-list mailing list
>>>>> Mono-devel-list at lists.ximian.com
>>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>> _______________________________________________
>>>> Mono-devel-list mailing list
>>>> Mono-devel-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list