How to clean up expired certs on your smart card

Hi all, The other day a colleague of mine was trying to renew his smart card certificate, but he got an error telling him that there was not enough space in the card to store the new cert. So he asked me: Alex, how can I delete a certificate from my smart card so there is…

2

RSACryptoServiceProvider.Encrypt returns "Key not valid for use in specified state" error

Hi all, When executing RSACryptoServiceProvider.Encrypt method (see How to generate key pairs, encrypt and decrypt data with .NET (C#) for an example), you may get a System.Security.Cryptography.CryptographicException. According to MSDN, this is to be expected in several circumstances: The cryptographic service provider (CSP) cannot be acquired. -or- The length of the rgb parameter is greater…

2

How to generate key pairs, encrypt and decrypt data with .NET (C#)

Hi all, The other day a colleague of mine asked me if I had a .NET version of the C++ sample in How to generate key pairs, encrypt and decrypt data with CryptoAPI post. C++ sample calls CryptoAPI directly (and you know we can do the same thing in .NET through P/Invoke), but the idea was to use…

9

Something has changed in my life

Hi all, Sorry I haven’t been able to write anything for a few weeks. I’ve been on vacation + paternity leave… Paternity leave! Yes, I’m a father now! My son Nicolas was born on Sept 11th, 2008, and he’s taken pretty much all my free time since. WELCOME TO OUR WORLD NICOLAS!!! I’ll try to…

0