pkcs15-init.c: patch to do_store_data_object()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pkcs15-init.c: patch to do_store_data_object()

Tarasov Viktor
Hi,

in pkcs15-init.c:do_store_data_object()
the 'sc_pkcs15init_dataargs' is not initalized to the default value,
expected by ASN1 encoder (libopensc/pkcs15-data.c +149).

Kind wishes,
Viktor.






--- ./opensc-0.9.6.orig/src/tools/pkcs15-init.c 2005-04-14 11:02:05.000000000 +0200
+++ ./opensc-0.9.6/src/tools/pkcs15-init.c 2005-08-10 11:47:09.000000000 +0200
@@ -877,6 +877,7 @@
  int r=0;
 
  memset(&args, 0, sizeof(args));
+ args.app_oid.value[0] = -1;
 
  if (opt_objectid)
  sc_pkcs15_format_id(opt_objectid, &args.id);

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: pkcs15-init.c: patch to do_store_data_object()

Nils Larsch
Tarasov Viktor wrote:

> Hi,
>
> in pkcs15-init.c:do_store_data_object()
> the 'sc_pkcs15init_dataargs' is not initalized to the default value,
> expected by ASN1 encoder (libopensc/pkcs15-data.c +149).
>
> Kind wishes,
> Viktor.
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> --- ./opensc-0.9.6.orig/src/tools/pkcs15-init.c 2005-04-14 11:02:05.000000000 +0200
> +++ ./opensc-0.9.6/src/tools/pkcs15-init.c 2005-08-10 11:47:09.000000000 +0200
> @@ -877,6 +877,7 @@
>   int r=0;
>  
>   memset(&args, 0, sizeof(args));
> + args.app_oid.value[0] = -1;
>  
>   if (opt_objectid)
>   sc_pkcs15_format_id(opt_objectid, &args.id);

agree, although this isn't really elegant (the internals of the
struct sc_object_id type should be hidden from the application ...).

Thanks,
Nils
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel