opensc/opensc-out-of-scope.patch

65 lines
2.1 KiB
Diff
Raw Normal View History

diff -ur opensc-0.13.0.orig/src/tools/pkcs11-tool.c opensc-0.13.0/src/tools/pkcs11-tool.c
--- opensc-0.13.0.orig/src/tools/pkcs11-tool.c 2012-12-04 15:43:40.000000000 +0100
+++ opensc-0.13.0/src/tools/pkcs11-tool.c 2014-02-28 16:33:19.234607615 +0100
@@ -1778,6 +1778,9 @@
CK_RV rv;
int need_to_parse_certdata = 0;
unsigned char *oid_buf = NULL;
+ CK_OBJECT_CLASS clazz;
+ CK_CERTIFICATE_TYPE cert_type;
+ CK_KEY_TYPE type = CKK_RSA;
#ifdef ENABLE_OPENSSL
struct x509cert_info cert;
struct rsakey_info rsa;
@@ -1858,8 +1861,8 @@
}
if (opt_object_class == CKO_CERTIFICATE) {
- CK_OBJECT_CLASS clazz = CKO_CERTIFICATE;
- CK_CERTIFICATE_TYPE cert_type = CKC_X_509;
+ clazz = CKO_CERTIFICATE;
+ cert_type = CKC_X_509;
FILL_ATTR(cert_templ[0], CKA_TOKEN, &_true, sizeof(_true));
FILL_ATTR(cert_templ[1], CKA_VALUE, contents, contents_len);
@@ -1892,7 +1895,7 @@
}
else
if (opt_object_class == CKO_PRIVATE_KEY) {
- CK_OBJECT_CLASS clazz = CKO_PRIVATE_KEY;
+ clazz = CKO_PRIVATE_KEY;
n_privkey_attr = 0;
FILL_ATTR(privkey_templ[n_privkey_attr], CKA_CLASS, &clazz, sizeof(clazz));
@@ -1940,7 +1943,7 @@
}
#if OPENSSL_VERSION_NUMBER >= 0x10000000L && !defined(OPENSSL_NO_EC)
else if (evp_key->type == NID_id_GostR3410_2001) {
- CK_KEY_TYPE type = CKK_GOSTR3410;
+ type = CKK_GOSTR3410;
FILL_ATTR(privkey_templ[n_privkey_attr], CKA_KEY_TYPE, &type, sizeof(type));
n_privkey_attr++;
@@ -1958,8 +1961,8 @@
}
else
if (opt_object_class == CKO_PUBLIC_KEY) {
- CK_OBJECT_CLASS clazz = CKO_PUBLIC_KEY;
- CK_KEY_TYPE type = CKK_RSA;
+ clazz = CKO_PUBLIC_KEY;
+ type = CKK_RSA;
FILL_ATTR(pubkey_templ[0], CKA_CLASS, &clazz, sizeof(clazz));
FILL_ATTR(pubkey_templ[1], CKA_KEY_TYPE, &type, sizeof(type));
@@ -1998,7 +2001,7 @@
}
else
if (opt_object_class == CKO_DATA) {
- CK_OBJECT_CLASS clazz = CKO_DATA;
+ clazz = CKO_DATA;
FILL_ATTR(data_templ[0], CKA_CLASS, &clazz, sizeof(clazz));
FILL_ATTR(data_templ[1], CKA_TOKEN, &_true, sizeof(_true));
FILL_ATTR(data_templ[2], CKA_VALUE, &contents, contents_len);
Only in opensc-0.13.0/src/tools: pkcs11-tool.c~
Only in opensc-0.13.0/src/tools: pkcs11-tool.c.orig