PKCS#12 File to Sign Assemblies?

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default PKCS#12 File to Sign Assemblies?


    I have an individual PKCS#12 file. Can I use it to sign assemblies
    instead of using "sn -k" ?

    Thanks.
    localhost Guest

  2. Similar Questions and Discussions

    1. #39867 [NEW]: Openssl: add wrapper functions for PKCS#12 handling
      From: delling at silpion dot de Operating system: all PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug...
    2. Sign In/Sign Out like macromedia page
      I would like to add a sign in link that after you are signed in changes to sign out like on the top of the macromedia site. If anyone can help with...
    3. Are MS Assemblies in the GAC?
      I want to create strongly signed support assemblies so they can be shared by different ASP.NET web apps. This requires that they be installed into...
    4. minus sign proportion to + sign in bold
      Does anyone know how to make a minus sign that is proportional to a plus sign (+) in bold in Freehand?
    5. PKCS #12 (.pfx) Export Greyed Out
      I am trying to export a certificate from Microsoft Certificate Server to be used for setting up TLS tunnels for use with wireless. I have figured...
  3. #2

    Default RE: PKCS#12 File to Sign Assemblies?

    Hi,

    sn.exe uses RSA public/private keypairs specified as either a snk file
    (which is simply a CryptoAPI PRIVATEKEYBLOB format) or you can also specify
    a CryptoAPI keycontainer name in your source code (or in the VS.NET
    AssemblyInfo.cs file) viz:
    [assembly:AssemblyKeyNameAttribute("anyCSPkeycontai ner")]

    You can use the private key associated with any issued/installed X509
    Certificate by specifying the corresponding keycontainer for the cert. If
    you do this, you might have to specify the CurrentUser store using:
    sn -m n
    (sn looks for Machine keycontainer names only).

    For whether it is possible to use an existing PKCS#12 file to sign an
    assembly, I will contact our specialiast on it to see if it could be done
    and reply here as soon as pobbile. If you have any more concerns on it,
    please feel free to post here.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

  4. #3

    Default RE: PKCS#12 File to Sign Assemblies?

    Hello,

    Thanks for your patient. I have got the answer of this question. :)

    For Signing:

    You have two alternatives to sign executables using PKCS #12 (PFX).

    Manual Process:

    1. Manually import the PFX file into My or Personal "Current User"
    Certificate
    Store using mmc.exe.
    2. Run signcode.exe -cn MyTestCodeSign -r currentUser -s my app.exe
    Where MyTestCodeSign is the common name of the certificate
    3. Delete the Certificate and the private key.

    Programmatically using CAPICOM:

    1. Signer.Load --> Loads a signing certificate from a specified PFX file.
    2. SignedCode.Sign --> The Sign method creates an Authenticode digital
    signature and signs the executable file specified in the
    SignedCode.FileName property.
    3. Signer.Certificate.PrivateKey.Delete().

    Hope that helps.

    Best regards,
    Yanhong Huang
    Microsoft Community Support

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Yan-Hong Huang[MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139