AspNet Code Signing Problems

Discussion in 'ASP .Net Security' started by Danb, Jul 23, 2006.

  1. Danb

    Danb Guest

    I want to sign an user-unique cabinet file. So each time I must resign the
    cabinet before it is downloaded by the user.

    I am trying to spawn a process that calls Signtool.exe with the arguments
    being:
    sign /f newcert.pfx /p password /v mycab.cab

    Starting the process yields a standard error result of:
    SignTool Error: File not found: newcert.pfx

    I have tried impersonating the person who owns the certificate and I get a
    different standard error of :
    SignTool Error: CoCreateInstance returned error: 0x80070005 Access is denied

    Does anyone know what I should do now?

    Thanks in advance,

    DanB
     
    Danb, Jul 23, 2006
    #1
    1. Advertisements

  2. Hi,

    i would fully qualify all paths that your are using, e.g. to the .pfx file.
    Otherwise you are making assumption about the working directory which may
    not be true, you can test this by using:

    <%= Environment.CurrentDirectory %>

    on a page.

    dominick

    > I want to sign an user-unique cabinet file. So each time I must resigne
    > the cabinet before it is downloaded by the user.
    >
    > I am trying to spawn a process that calls Signtool.exe with the
    > arguments
    > being:
    > sign /f newcert.pfx /p password /v mycab.cab
    > Starting the process yields a standard error result of: SignTool
    > Error: File not found: newcert.pfx
    >
    > I have tried impersonating the person who owns the certificate and I
    > get a
    > different standard error of :
    > SignTool Error: CoCreateInstance returned error: 0x80070005 Access is
    > denied
    > Does anyone know what I should do now?
    >
    > Thanks in advance,
    >
    > DanB
    >
     
    Dominick Baier, Jul 24, 2006
    #2
    1. Advertisements

  3. Danb

    Danb Guest

    Oops,

    I have in previous efforts inserted the fully qualified paths and used
    server.mapppath and io.file.exists to check that those files are found. But
    when I use the resultant strings I continue to get the same errors.

    Let me ask one thing. My certificate does not indicate that it is valid
    for code signing YET when I use the signtool wizard it will in fact sign the
    cabinet.
    Is it possible that this could be my problem with unattended signing? In
    other words because it is not a code signing certificate signtool rejects
    the certificate but instead of telling me why it sends this very ambiguous
    error?

    PS. Dominick sorry about the previous post that was sent to you only. I
    clicked the wrong button :<.

    <dbaier@pleasepleasenospam_leastprivilege.com> wrote in message
    news:...
    > Hi,
    > i would fully qualify all paths that your are using, e.g. to the .pfx
    > file. Otherwise you are making assumption about the working directory
    > which may not be true, you can test this by using:
    >
    > <%= Environment.CurrentDirectory %>
    >
    > on a page.
    >
    > dominick
    >
    >> I want to sign an user-unique cabinet file. So each time I must resigne
    >> the cabinet before it is downloaded by the user.
    >>
    >> I am trying to spawn a process that calls Signtool.exe with the
    >> arguments
    >> being:
    >> sign /f newcert.pfx /p password /v mycab.cab
    >> Starting the process yields a standard error result of: SignTool
    >> Error: File not found: newcert.pfx
    >>
    >> I have tried impersonating the person who owns the certificate and I
    >> get a
    >> different standard error of :
    >> SignTool Error: CoCreateInstance returned error: 0x80070005 Access is
    >> denied
    >> Does anyone know what I should do now?
    >>
    >> Thanks in advance,
    >>
    >> DanB
    >>

    >
    >
     
    Danb, Jul 24, 2006
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary Nelson

    Upgrade from aspnet 1.1 to aspnet 2.0

    Gary Nelson, Oct 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    683
    Gary Nelson
    Oct 14, 2005
  2. gerry

    code signing in 2005

    gerry, Feb 28, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    555
    gerry
    Feb 28, 2006
  3. Jacob
    Replies:
    2
    Views:
    1,229
    Roedy Green
    Jul 19, 2003
  4. Roedy Green
    Replies:
    1
    Views:
    505
    Dale King
    Jul 15, 2003
  5. Replies:
    7
    Views:
    932
    Juan T. Llibre
    Mar 23, 2007
  6. Brian Schuth
    Replies:
    0
    Views:
    484
    Brian Schuth
    Sep 8, 2003
  7. Jean

    Code signing

    Jean, Feb 1, 2006, in forum: ASP .Net Security
    Replies:
    1
    Views:
    246
    Henning Krause [MVP]
    Feb 1, 2006
  8. Alfred Sehmueller
    Replies:
    0
    Views:
    524
    Alfred Sehmueller
    Feb 20, 2004
Loading...