Re: "ANSI bad file tag"....cannot read certificate
From: S R Tripathy (shakti_at_acm.org)
Date: 11/23/04
- Next message: lelteto: "RE: patch for advapi32.dll ffor XP SP2"
- Previous message: S R Tripathy: "Re: certificates and ASP.NET"
- In reply to: shahid: ""ANSI bad file tag"....cannot read certificate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 23 Nov 2004 12:19:40 -0000
Try calling the "reset" function on the stream before reading
Rgds
Shakti
"shahid" <fake@microsoft.com> wrote in message
news:ejYoJEU0EHA.2568@TK2MSFTNGP11.phx.gbl...
> Hi all,
>
> i am trying to read a certificate serialized on the hard disk. when i try
to
> read this certificate using ifstream, "ANIS bad file tag" message is
> displayed.
> i am using the following code:
>
> ifstream certIn;
> certIn.open("C:\\atemp.cer");
> certIn.seekg(0,ios::end);
> int nSize = certIn.tellg();
> certIn.seekg(0,ios::beg);
> char cert[nSize];
> certIn.read(cert,nSize);
> certIn.close();
>
> Regards
>
>
- Next message: lelteto: "RE: patch for advapi32.dll ffor XP SP2"
- Previous message: S R Tripathy: "Re: certificates and ASP.NET"
- In reply to: shahid: ""ANSI bad file tag"....cannot read certificate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|