Re: Ask the Experts Help



Slight update:

I didn't mention the 3rd party dll is also unmanaged C++. I did find the
chktrust.exe to check an "assembly's" certificate, but only in my VS 2003
bin directory, not in the (beta2) VS2005 bin. It says it's not trusted.
Maybe chktrust doesn't work on unmanaged C++ dlls?

However, if I go thru the motions of trying to sign my test.exe app with a
test certificate (makecert, signcode) then run "setreg.exe 1 true" on the
desktop, then run chktrust.exe, it says my test.exe isn't trusted either.
Even though the file increased by about 2K in the process.

If I deploy this signed (maybe) copy of test.exe to the PDA, I still get the
not-trusted error right away.

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Tim Johnson" <tjohnson@xxxxxxxxxxxxxx> wrote in message
news:uSLv$TM5FHA.2560@xxxxxxxxxxxxxxxxxxxxxxx
> There are a number of other posts on this same error message (including a
> couple from me), with no answers. One such thread is here:
>
> http://msdn.microsoft.com/newsgroups/default.aspx?query=certificate&dg=microsoft.public.pocketpc.developer&cat=en-us-msdn-mobile-ppc&lang=en&cr=US&pt=&catlist=9A8119CF-126A-4E25-924D-CF615B37BCE0%2C774F24A2-F71F-425F-AC2B-DC48AB0DA5C9&dglist=&ptlist=&exp=&sloc=en-us
>
> In my case I've narrowed it down to this with some small test apps, not
> even having to do with .Net:
>
> - an unmanaged C++ evc4.0 app links with a target 3rd party dll. This dll
> is marked hidden/system/read-only/InROM. In my test code I do a simple
> "TargetClass x = new TargetClass();" call. I believe it's the act of using
> the target dll that triggers the error message. I can instead do just a
> LoadLibrary of the dll (but don't actually use it) with no problem. And if
> I link with the .lib for the target dll, but again don't actually use it,
> no problem.
>
> - If instead I link my test app with my own test dll also written in
> unmanaged C++ evc4.0 dll and try to get an instance of an object and call
> a test method, no problem. This proves even under WM5 you can still
> create runnable apps and dlls with evc4.0, no certicates required, no
> VS2005 required.
>
> - If I mark my test dll hidden/system/read-only, I can still run my test
> app without problems
>
> So it definitely seems more due to the "trusted certificate" issue than
> the "component not found" issue.
>
> But I still can't determine:
>
> a) is the target 3rd party dll signed with a certificate? It's never been
> signed before, and I don't know what utility would tell me this.
>
> b) if I just sign my test app would it then be able to use the target dll?
> Can I just sign it with a test cert? A real cert? Does it have to be the
> same cert as the target dll was signed with in order to use it?
>
> c) how can I sign my test app with a test certificate? The online docs
> for a desktop use case say I'd need to run the SetReg.exe utility to set
> some registry value that makes test certificates be "ok". Is there a
> similar utility for WM5 pdas?
>
> I can't believe that EVERY app anybody ever writes for WM5 needs to be
> signed with a costly certificate!
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
> "Matt" <zimmerma009@xxxxxxxxxxx> wrote in message
> news:1131484665.955066.97740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> Hello,
>>
>> I know that some of the MS experts read through these posts and I have
>> a question for them. Today I took part in the ask the experts online
>> chat. I had an issue where when I attempted to run my applicaiton and
>> I would get the following error:
>>
>> "The file '<file name>' cannot be opened. Either it is not signed
>> with a trusted certificate, or one if its components cannot be found.
>> You might need to reinstall or restore this file."
>>
>> Their suggestion was to create another dummy project and copy over the
>> "additional files" path from the generated project to my project. This
>> was probably a good thing considering this was blank in my migrated
>> project.
>>
>> The problem that I have with this is that it did not fix my problem. I
>> was wondering if there was anything else I can do to fix this or
>> anything else I should try.
>>
>> Thanks.
>>
>> Matt
>>
>
>


.



Relevant Pages

  • Re: Ask the Experts Help
    ... - an unmanaged C++ evc4.0 app links with a target 3rd party dll. ... the target dll that triggers the error message. ... So it definitely seems more due to the "trusted certificate" issue than the ... if I just sign my test app would it then be able to use the target dll? ...
    (microsoft.public.pocketpc.developer)
  • Re: Programmatically Signing DLL
    ... key on it and sign a .DLL before it goes into production. ... > Dim Signer, SignedCode ... What kind of certificate do we need to buy to allow programmatic ... signing and validation of a DLL using VC++. ...
    (microsoft.public.security)
  • Re: Hi, Any work around for windows mobile 6 dynamic loading warni
    ... xml file is named _setup.xml (ensure you include the underscrore as the ... Then included the dll during runtime. ... your only option is to purchase a code signing certificate from the ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Are .NET Windows Applications Totally Insecure?
    ... First off, an item (whether it be a native exe, dll or .net assembly or java appetl) ... It is up to the owner to ensure that they *trust* the digital certificate (and hence the ...
    (microsoft.public.dotnet.security)
  • privileged dll in c# application
    ... application to run i must select a Privileged Certificate from the ... I created the dll with the ... Finally i deploy the application to my Smartphone and run it ... However i do not understand how the embedded visual c++ app works however ...
    (microsoft.public.dotnet.framework.interop)