2011/5/22 <webmas...@opensc-project.org>: > Revision: 5465 > Author: vtarasov > Date: 2011-05-22 10:52:44 +0000 (Sun, 22 May 2011) > > Log Message: > ----------- > pkcs11-tool: import GOST key; key to import in DER or PEM format > > Modified Paths: > -------------- > trunk/src/tools/pkcs11-tool.c > > Modified: trunk/src/tools/pkcs11-tool.c > =================================================================== > --- trunk/src/tools/pkcs11-tool.c 2011-05-22 10:21:59 UTC (rev 5464) > +++ trunk/src/tools/pkcs11-tool.c 2011-05-22 10:52:44 UTC (rev 5465) > @@ -20,11 +20,18 @@ > > #include "config.h" > > +#include <fcntl.h> > +#include <stdio.h> > +#include <stdlib.h> > #ifdef ENABLE_OPENSSL > +#if OPENSSL_VERSION_NUMBER >= 0x10000000L > #include <openssl/opensslconf.h> > +#endif > +#include <openssl/conf.h> > #include <openssl/evp.h> > #include <openssl/x509.h> > #include <openssl/rsa.h> > +#include <openssl/pem.h> > #if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_EC) && > !defined(OPENSSL_NO_ECDSA) > #include <openssl/ec.h> > #include <openssl/ecdsa.h>
With this change I get a compiler warning: pkcs11-tool.c:27:5: warning: "OPENSSL_VERSION_NUMBER" is not defined This is because OPENSSL_VERSION_NUMBER is used before it is defined. A simple solution is to define it first. Proposed patch: Index: src/tools/pkcs11-tool.c =================================================================== --- src/tools/pkcs11-tool.c (revision 5530) +++ src/tools/pkcs11-tool.c (working copy) @@ -24,10 +24,10 @@ #include <stdio.h> #include <stdlib.h> #ifdef ENABLE_OPENSSL +#include <openssl/conf.h> #if OPENSSL_VERSION_NUMBER >= 0x10000000L #include <openssl/opensslconf.h> #endif -#include <openssl/conf.h> #include <openssl/evp.h> #include <openssl/x509.h> #include <openssl/rsa.h> Or maybe the relative order between openssl/conf.h and openssl/opensslconf.h is important and the patch is wrong? Bye -- Dr. Ludovic Rousseau _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel