Welcome to MSDN Blogs Sign in | Join | Help

Managed StrongName API

About a week ago, I wrote about verifying strong name signatures from managed code.  There are also several other strong name APIs exposed to unmanged code that don't have any managed equivilent, so I thought it might be a good idea to turn that post into a series of posts porting most of the strong name functionality to managed code.  Once that's done, it should be pretty easy to write a simple managed re-implementation of sn.exe, to demonstrate how all of the APIs are used.  As I do each API, I'll also update the P/Invoke wiki for mscorsn.  (keeping in mind that mscorsn.dll goes away in Whidbey, as it gets merged into mscorwks).

I've been working on this in my spare time over the last week or so, and have come up with this general design:

  • StrongName.Native.dll - contains only P/Invoke wrappers around the strong name functions.
  • StrongName.dll - I haven't decided if this one is necessary or not.  The idea behind it would be to have managed wrappers around the functions exposed in StrongName.Native.dll to give them a more natural feel.
  • ManagedSN.exe - managed port of SN.exe.  This one should be easy once StrongName.Native.dll is implementd.

I'll also use this as an excuse to get ramped up with MSBuild.  However, everything should also work for v1.1 of the framework, since I'll P/Invoke to the mscoree function stubs.  As for the code, I'm not quite sure how I'll handle that yet.  I'll probably start by just storing it in this blog, then possibly move to a better solution such as the gotdotnet workspaces if this idea takes off.  I've also created a new StrongName category on the blog, so that it'll be easy to get all of the posts on this project together.

Published Friday, June 18, 2004 3:30 PM by shawnfa
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Managed StrongName API

Tuesday, June 22, 2004 3:00 AM by Dave Thomas
what about a wrapper arounf mscoree and the GetPermissionRequests method, and a managed version of the permview tool, that is something I would like to have...

# re: Managed StrongName API

Tuesday, June 22, 2004 8:48 AM by Shawn
Good idea Dave ... that's something I'll also consider showing.

-Shawn

# Managed Strong Names: Verification and the msn.exe tool

Wednesday, June 23, 2004 2:05 PM by .Net Security Blog

# Generating StrongName Keys

Friday, July 09, 2004 8:14 PM by .Net Security Blog

# Extracting Public Key Blobs

Tuesday, November 30, 2004 5:25 PM by .Net Security Blog

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker