Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2004

Tip: Looking for answers? Try searching our database.

Retrieving Authenticode countersignature time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Merrill - 13 May 2004 23:11 GMT
I need to port some C++ code to .Net/c#
One function we use retrieves the countersignature time from an authenticode signed dll or exe
Is there a way to do this using existing .Net classes or do I have to use P/Invoke for most of it?
Tian Min Huang - 14 May 2004 09:53 GMT
Hello,

Thanks for your post. Which function do you call in C++ to retrieve the
countersignature time? I suggest you to check whether your are find
corresponding .NET class method according to the MSDN article below:

Microsoft Win32 to Microsoft .NET Framework API Map
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/ht
ml/win32map.asp

If there is no such mapping, you will have to use P/Invoke.

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
David Merrill - 18 May 2004 22:16 GMT
> Which function do you call in C++ to retrieve the countersignature time?

CryptQueryObject, CryptMsgGetParam, and CryptDecodeObject.
These functions are missing from the document you referenced.
Actually it seems that all CryptoAPI functions are missing from that document even though there are some crypto classes in .Net.

Is there a utility that can easily create c# wrappers around API calls and structures and COM interfaces?
Or is there a reference library with all of this already done?
Tian Min Huang - 20 May 2004 10:53 GMT
Hi,

Thanks for your response. You will need to use P/Invoke to call these
unmanaged APIs in .NET. Please refer to the sample in the following MSDN
artcle:
EncryptTo/DecryptTo: Encryption in .NET with CryptoAPI Certificate Stores
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncapi/html
/encryptdecrypt2a.asp

In addtion, I believe  the article below is helpful on P/Invoke:

Consuming Unmanaged DLL Functions
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconConsumingUnmanagedDLLFunctions.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.