----Mensaje original----
De: [email protected]
Fecha: 03/12/2010 9:48
Para: <[email protected]>
CC: <[email protected]>
Asunto: Re: [opensc-devel] r4904 and OpenSSL-1.0.0b in Fedora 14
....
> OPENSSL_VERSION_NUMBER >= 0x10000000L && !defined(OPENSSL_NO_EC) is
> the key,
> Douglas hopefully plans that into the next patch unless you do it before
> (I don't have a Fedora VM available at the moment)
....
OK :-) attached patch works for me
Juan Antonio
diff -rbuN --exclude=.svn opensc/src/tools/piv-tool.c cenatic/opendnie/opensc-dnie/trunk/src/tools/piv-tool.c
--- opensc/src/tools/piv-tool.c 2010-12-03 10:04:30.000000000 +0100
+++ cenatic/opendnie/opensc-dnie/trunk/src/tools/piv-tool.c 2010-12-03 10:01:57.000000000 +0100
@@ -31,7 +31,9 @@
#include <ctype.h>
#include <sys/stat.h>
#include <openssl/rsa.h>
+#ifndef OPENSSL_NO_EC
#include <openssl/ec.h>
+#endif
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/bn.h>
@@ -321,7 +323,9 @@
EVP_PKEY_assign_RSA(evpkey, newkey);
- } else { /* EC key */
+ }
+#ifndef OPENSSL_NO_EC
+ else { /* EC key */
int i;
BIGNUM *x;
BIGNUM *y;
@@ -348,6 +352,7 @@
EVP_PKEY_assign_EC_KEY(evpkey, eckey);
}
+#endif
if (bp)
r = i2d_PUBKEY_bio(bp, evpkey);
diff -rbuN --exclude=.svn opensc/src/tools/pkcs11-tool.c cenatic/opendnie/opensc-dnie/trunk/src/tools/pkcs11-tool.c
--- opensc/src/tools/pkcs11-tool.c 2010-12-03 10:04:30.000000000 +0100
+++ cenatic/opendnie/opensc-dnie/trunk/src/tools/pkcs11-tool.c 2010-12-03 11:23:26.000000000 +0100
@@ -24,7 +24,9 @@
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/rsa.h>
+#ifndef OPENSSL_NO_EC
#include <openssl/ec.h>
+#endif
#include <openssl/bn.h>
#include <openssl/err.h>
#endif
@@ -1247,6 +1249,9 @@
* so we will write it for OpenSSL if built with OpenSSL
*/
if (opt_mechanism == CKM_ECDSA) {
+#ifdef OPENSSL_NO_EC
+ util_fatal("OpenSSL ECDSA_SIG: not supported");
+#else
int nLen;
ECDSA_SIG * ecsig = NULL;
unsigned char *p = NULL;
@@ -1264,6 +1269,7 @@
free(p);
ECDSA_SIG_free(ecsig);
+#endif
} else
#endif
r = write(fd, buffer, sig_len);
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel