LogIn SDK - Windows SDK team blog - Site Home - MSDN Blogs
Sign In
LogIn SDK - Windows SDK team blog
#define _WIN32_WINNT
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
Access Denied
Ankit
Balajee
Base
certificate
CreateRemoteThread
Crypto
CryptographicException
integrity level
LogonUser
Mahatab
Networking
Nitin
performance counters
Prateek
Sandeep
Security
Service
setsockopt
Shamik
signtool
Token
UAC
windows media
windows media encoder
Archive
Archives
November 2010
(3)
August 2010
(2)
May 2010
(12)
January 2010
(7)
December 2009
(2)
November 2009
(30)
October 2009
(4)
September 2009
(1)
August 2009
(1)
July 2009
(7)
MSDN Blogs
>
LogIn SDK - Windows SDK team blog
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
LogIn SDK - Windows SDK team blog
How to get the CSP name from a certificate containing the private key?
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
I was testing with some code to get the CSP name from a certificate containing the private key. A sample code is shown below: // GetCSPFromCert.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include...
LogIn SDK - Windows SDK team blog
How to take a quartz log?
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
Many a times I do get this questions from my varied customers and colleagues and I cannot answer them instantly or even after looking here and there for a day. So I just wanted to blog it. Please see the MSDN link http://msdn.microsoft.com/en-us...
LogIn SDK - Windows SDK team blog
Getting a “System.ArgumentException: Value was invalid” when trying to sign data using SHA256CryptoServiceProvider Here is the symptom:
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
1. You are using RSACryptoServiceProvider for computing SHA-2 signatures. 2. Doing this you get unhandled exceptions of type "System.ArgumentException" in mscorlib.dll saying "Value was invalid". 3. A typical call that failed was:...
LogIn SDK - Windows SDK team blog
Getting a “System.ArgumentException: Value was invalid” when trying to sign data using SHA256CryptoServiceProvider
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
Here is the symptom: 1. You are using RSACryptoServiceProvider for computing SHA-2 signatures. 2. Doing this you get unhandled exceptions of type "System.ArgumentException" in mscorlib.dll saying "Value...
LogIn SDK - Windows SDK team blog
Compliance of .Net security libraries about verifying a CMS Advanced Electronic Signatures (CAdES) message
Posted
over 2 years ago
by
Prateek Kr Dubey
1
Comments
CAdES is an extension of CMS and these extensions, where present, require a different process to check the signature. Our .Net security libraries (System.Security.Cryptography) though verify a CAdES message; it actually ignores the CAdES part within the...
LogIn SDK - Windows SDK team blog
Dealing with Administrator and standard user’s context
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
With introduction of UAC, I often get two questions for Windows Vista and later. 1) How to launch an application in the Administrative context from an application which is running in standard user’s context? 2) How to launch application in...
LogIn SDK - Windows SDK team blog
How to make your custom RNG (random number generator) implementation the default RNG provider for the system using CNG API's
Posted
over 2 years ago
by
Prateek Kr Dubey
1
Comments
If you have implemented your random number generator make sure that you register it using BCryptRegisterProvider function. Add the algorithm name to the list of symmetric cipher algorithm class using BCryptAddContextFunction. Example: ...
LogIn SDK - Windows SDK team blog
How to use ADSI/LDAP API’s for querying active directory using credentials derived from a Smart Card
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
There are no ADSI/LDAP API’s that eventually could directly use the Smart Card Credentials. We could follow the steps below: 1. Get the user credentials by reading in the certificate from the Smart card. 2. Call LogonUser() to get the user’s...
LogIn SDK - Windows SDK team blog
Screen capture using Windows Media Encoder
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
If you have to screen capture using Windows Media Encoder please follow the steps below. Start Windows Media Encoder (WM Encoder). To download WM encoder please refers to the link http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02...
LogIn SDK - Windows SDK team blog
You might get a high CPU usage while decrypting using RSA keys
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
You might get a high CPU usage while decrypting using RSA keys The root cause of this issue (high CPU usage while decrypting using RSA keys) is as stated in the MSDN link http://msdn.microsoft.com/en-us/magazine/cc163676.aspx . The name...
LogIn SDK - Windows SDK team blog
How to read a certificate from a Smart Card and add it to the system store
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
The basic high level steps to read a certificate from a Smart Card and add it to the system store are: 1. Establish a Smart Card context using SCardEstablishContext. 2. Display the select card dialog box. 3. Get the card type provider name. ...
LogIn SDK - Windows SDK team blog
Steps for creating a self-signed certificate with the key container created at the machine key set and private key exportable.
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
Here are the steps for creating a self-signed certificate with the key container created at the machine key set. Step 1: Get the CSP handle by creating the key container at the machine key folder. if (!CryptAcquireContext(&hCryptProv...
LogIn SDK - Windows SDK team blog
CryptAcquireCertificatePrivateKey fails with CRYPT_E_NO_KEY_PROPERTY (0x8009200B ) when trying to obtain access to a user's private key on machine's after the user changes his password.
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
You create a key container on a machine for a specific user on the user’s profile. You log off the user and login with the administrator account and forcibly change the user’s password. Next time if you log on to the machine with the...
LogIn SDK - Windows SDK team blog
Error with WMEncoderLib when trying to build a 64 bit version of your application.
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
You may get a runtime error with your 64 bit managed Windows Media Encoder application while the 32 bit application runs perfect. This happens basically when your application tries to encode or more specifically transcode certain files that usually...
LogIn SDK - Windows SDK team blog
How to update security bulletin MS10-013 on a Windows Server 2000 box?
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
While updating your Windows 2000 box with latest security fixes you may get a situation where you may be stuck with the security fix MS10-013 asking you to update the latest DirectX. Basically this happens when you are doing a system update with the...
LogIn SDK - Windows SDK team blog
Understanding of SignedCms.CheckSignature(True)
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
An understanding of SignedCms.CheckSignature(True) based on the code stated below. ' Create a ContentInfo object from the inner content obtained ' independently from encodedMessage. Dim contentInfo As New ContentInfo(innerContent...
LogIn SDK - Windows SDK team blog
Behaviour of AesCryptoServiceProvider class with FIPS policy set/ unset
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
You may want to use a Crypto API for Advanced Encryption Standard that is FIPS 140-2 complaint. While doing this using managed code you can come across the AesCryptoServiceProvider class that is FIPS complaint. I want to highlight some points before...
LogIn SDK - Windows SDK team blog
Passing the flag CERT_CLOSE_STORE_FORCE_FLAG to CertCloseStore may cause your application to crash.
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
CertCloseStore is called with flag CERT_CLOSE_STORE_FORCE_FLAG. This flag forces CertCloseStore to free memory for all contexts associated with the store. This flag can be safely used only when the store is opened in a function and neither the store handle...
LogIn SDK - Windows SDK team blog
Application deadlock while calling a CAPI function within DllMain
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
I have seen developers trying to call cryptographic functions/ API’s within DllMain and thereby creating a hang in their application that calls this DLL. The reason behind this is not the cryptographic API but this is a classical deadlock example. This...
LogIn SDK - Windows SDK team blog
VB.NET code to find a certificate with its issuer name and display its contents – small post but helpful
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
This is a small blog post but I found it handy and useful to document. I created a test certificate with name “shmisra” and kept it in the “Personal” store in the users profile as shown below. I read this certificate and print its details using the code...
LogIn SDK - Windows SDK team blog
'System.Security.Cryptography.CryptographicException - The index value is not valid'
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
While trying to extract the public key from a certificate you may get an exception that says: 'System.Security.Cryptography.CryptographicException - The index value is not valid'. The exact error is CRYPT_E_INVALID_INDEX which means "The index value...
LogIn SDK - Windows SDK team blog
You may get a service timeout from a signed .NET/ managed service application while the system is doing a revocation check of the certificate over the internet.
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
You may get a service timeout from your signed .NET service application while the OS does a revocation check to verify the certificate that signed the EXE. The reason behind this time out is because of a worker thread which is waiting for a response from...
LogIn SDK - Windows SDK team blog
What should you do if you find that DecryptMessage (Schannel) function returns SEC_E_INVALID_TOKEN; which means the buffers are of wrong type or no buffer of type SECBUFFER_DATA was found.
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
DecryptMessage (Schannel) function returns SEC_E_INVALID_TOKEN, means the buffers are of the wrong type or no buffer of type SECBUFFER_DATA was found. In short the buffers are not set properly. A quick reference is the example at the link http://msdn...
LogIn SDK - Windows SDK team blog
While creating cryptographic keys or key containers repeatedly, your hard disk may get filled with lots of files and may end up filling the whole hard disk space, if not deleted.
Posted
over 2 years ago
by
Prateek Kr Dubey
0
Comments
A cryptographic service provider creates key containers for storing RSA public/private asymmetric key pairs. Key containers are stored in the user profiles unless you specify the machine key folder. Say you use RSACryptoServiceProvider class to create...
LogIn SDK - Windows SDK team blog
I lost the “Security” tab of offline files synced by Sync Centre !!
Posted
over 3 years ago
by
Prateek Kr Dubey
0
Comments
In Windows Vista and later there is a cool feature of making network shared files available offline and maintaining the synchronization through a newly added component called Sync Centre. You may find more information about it here: Explore...
Page 1 of 3 (69 items)
1
2
3