On Nov 25, 12:30 am, "Wan-Teh Chang" <[EMAIL PROTECTED]> wrote:
> On Nov 24, 2007 6:31 AM,  <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello people,
>
> > I'm using VC++ 6.0 with SP5 and the processor pack 5 installed. My
> > operating system is Windows XP with SP2.
>
> > I have downloaded NSS-3.11.4 with NSRP 4.6.4
> > I have installed mozilla build package 1.1 and have also generated all
> > the necessary files.
>
> > I'm just trying to use the NSS.
>
> > I wanted to get a handle for the certificate in the certificate
> > database. I have properly setup the VC++ environment. I could compile
> > the code but have errors when trying to link the same.
>
> > The following is the error I'm getting:
>
> > Sample.obj : error LNK2001: unresolved external symbol "char * __cdecl
> > SECU_ConfigDirectory(char const *)" (?
> > SECU_ConfigDirectory@@[EMAIL PROTECTED])
>
> > Debug/sample.exe : fatal error LNK1120: 1 unresolved externals
>
> > What files do I need to link to get this error cleared?
>
> > I have included the code below:
>
> > #include "nss.h"
> > #include "cert.h"
> > #include "certdb.h"
> > #include "secutil.h"
>
> > int main(int argc, char **argv)
> > {
> >         SECStatus rv;
> >         CERTCertDBHandle *certHandle;
> >         CERTCertificate *cert;
>
> >         rv = NSS_Init(SECU_ConfigDirectory(NULL));
> >         certHandle = CERT_GetDefaultCertDB();
> >         cert = CERT_FindCertByNickname(certHandle, "User1");
>
> >         return 0;
> > }
>
> You should not use "secutil.h" and the functions declared in it
> (e.g., SECU_ConfigDirectory).  These functions are for NSS
> internal use.  They are used by the NSS command-line tools.
> These functions are defined in the internal static library sectool.lib,
> as opposed to the public NSS DLLs.
>
> Wan-Teh


OK then...I need some clarification

My purpose is to sign a file using NSS.....I tried out that using C++
XPCOM as said in my earlier posts...for which I didn't get any
reply....

So how do I do that using NSS......I need to sign a file even if the
private key is in the browser store or in the token...

Arun
Arun
_______________________________________________
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to