[Botan-devel] "Access violation" error when creating Pipe

reen du reendu at gmail.com
Sun Jan 27 20:04:45 EST 2008


Hi Jack,

Thanks a lot for the help!

I tried with /GR flag in the complier options. It works!

Thanks again.

Best Regards,
-Zhuang

>
> Date: Fri, 25 Jan 2008 09:06:02 -0500
> From: Jack Lloyd <lloyd at randombit.net>
> Subject: Re: [Botan-devel] "Access violation" error when creating Pipe
>        object  with a PK_Encryptor_Filter
> To: Botan development list <botan-devel at randombit.net>
> Message-ID: <20080125140601.GK5408 at randombit.net>
> Content-Type: text/plain; charset=us-ascii
>
> Hello Reen,
>
> At a glance, you code looks fine. I'm guessing this problem is your
> program was not compiled with the /GR flag (if you're using a VC
> project the setting should be called something like "Enable
> RTTI"). The reason it works with Base64_Encoder but not the
> PK_Encryptor_Filter is dynamic_cast (which requires RTTI) is only used
> in a few places in Botan, one major one being in the public key code
> (though since Pipe also uses dynamic_cast some operations even with a
> base64 filter would fail later on).
>
> Regards,
>  Jack
>
> On Fri, Jan 25, 2008 at 05:25:15PM +0800, reen du wrote:
> > Hi Gurus,
> >
> > I am running into an "Access violation" error when trying to initiate a
> Pipe
> > object with a PK_Encryptor_Filter. I am on Windows 2000 with MS VS.Net2003
> > compiler. The compiled program just throws "Exception: Access violation
> - no
> > RTTI data" after following statement:
> >
> > Pipe pipe(new Botan::PK_Encryptor_Filter(get_pk_encryptor(*rsakey,
> > > "EME1(SHA-1)")));
> >
> >
> > I have checked that the "new
> > Botan::PK_Encryptor_Filter(get_pk_encryptor(*rsakey, "EME1(SHA-1)"))"
> did
> > returned a valid pointer, and the rsa key is also valid. If I replaced
> the
> > PK_Encryptor_Filter with other types of filters, say, Base64_Encoder,
> the
> > code just worked fine.
> >
> > Below attached my complete code. Any pointers are highly appreciated.
> >
> > Thanks a lot!
> > -Reen
>
>
> ------------------------------
>
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel
>
>
> End of botan-devel Digest, Vol 37, Issue 1
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20080128/3f3f389c/attachment.html>


More information about the botan-devel mailing list