Re: [Botan-devel] New with Botan
Brought to you by:
randombit
|
From: Jack L. <ll...@ac...> - 2003-07-03 17:04:23
|
Wow, this is strange. Your program looks fine, leaving me with three major
suspicions as to the problem:
1) I've had problems with gcc 2.96 in the past, and these days only test
Botan with the one that was included in RH 7.3 (which IIRC has some
various bug fixes included that RH 7.1's gcc will be missing). Try
installing the latest 2.96 RPM from RedHat and see if that helps.
2) There is an uncaught exception. For example, the constructor you are
calling by default expects the input file to be in PEM format, but if
it is not, then it will throw an exception. To tell it to expect raw
DER/BER encoding, pass RAW_BER as a second parameter to the
constructor. To see if the problem you're seeing is from an exception
throw, try using this:
try {
// the code from your main()
}
catch(std::exception& e)
{
std::cout << e.what() << std::endl;
}
in which case you will hopefully get a semi-useful diagnostic about
whatever is wrong.
3) There is some bug in Botan - not completely impossible. :) Could you
send me the certificate file you're using, I'll see if I can reproduce
the problem on my end.
-Jack
On Tue, 1 Jul 2003, Mauricio Castillo Silva wrote:
> Hi.
> I just download Botan 1.2.4 and start using it.
> I'm working in Linux RedHat 7.1, gcc 2.96.
> I compile the library and everything goes fine.
> I then create a simple program, that just gets a certificate from a file.
> The program returns this:
>
> Aborted (core dumped).
>
> I'm compiling the source with:
> g++ -o test test1.cpp -I../include/botan -lbotan
>
> I don't know what I'm missing... thanks for the help.
> ____________Test1.cpp___________________________
>
> #include <botan.h>
> #include <iostream>
> #include <x509cert.h>
>
> using namespace Botan;
>
> int main()
> {
> LibraryInitializer init;
> DataSource_Stream in("user1.cer");
>
> cout << "Datasource ready." << endl;
> X509_Certificate cert(in); //This is not working
> return 0;
> }
>
|