Add a git revision number
[gpgme.git] / TODO
1 Hey Emacs, this is -*- org -*- mode!
2
3 * Document all the new stuff.
4 * Fix the remaining UI Server problems:
5 ** VERIFY --silent support.
6 ** ENCRYPT/DECRYPT/VERIFY/SIGN reset the engine, shouldn't be done with UISERVER?
7
8 * IMPORTANT
9 ** When using descriptor passing, we need to set the fd to blocking before
10    issueing simple commands, because we are mixing synchronous
11    commands into potentially asynchronous operations.
12 ** Might want to implement nonblock for w32 native backend!  Right now,
13    we block reading the next line with assuan.
14
15 * Before release:
16 ** Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig)
17    The test is currently disabled there and in gpg/t-import.
18 ** When gpg supports it, write binary subpackets directly,
19    and parse SUBPACKET status lines.
20
21 * ABI's to break:
22 ** Old opassuan interface.
23 ** Implementation: Remove support for old style error codes in
24    conversion.c::_gpgme_map_gnupg_error.
25 ** gpgme_edit_cb_t: Add "processed" return argument
26    (see edit.c::command_handler).
27 ** I/O and User Data could be made extensible.  But this can be done
28    without breaking the ABI hopefully.
29 ** All enums should be replaced by ints and simple macros for
30    maximum compatibility.
31 ** Compatibility interfaces that can be removed in future versions:
32 *** gpgme_data_new_from_filepart
33 *** gpgme_data_new_from_file
34 *** gpgme_data_new_with_read_cb
35 *** gpgme_data_rewind
36 *** gpgme_op_import_ext
37 *** gpgme_get_sig_key
38 *** gpgme_get_sig_ulong_attr
39 *** gpgme_get_sig_string_attr
40 *** GPGME_SIG_STAT_*
41 *** gpgme_get_sig_status
42 *** gpgme_trust_item_release
43 *** gpgme_trust_item_get_string_attr
44 *** gpgme_trust_item_get_ulong_attr
45 *** gpgme_attr_t
46 *** All Gpgme* typedefs.
47
48
49 * Thread support:
50 ** When GNU Pth supports sendmsg/recvmsg, wrap them properly.
51 ** Without timegm (3) support our ISO time parser is not thread safe.
52    There is a configure time warning, though.
53
54 * New features:
55 ** Flow control for data objects.
56    Currently, gpgme_data_t objects are assumed to be blocking.  To
57    break this assumption, we need either (A) a way for an user I/O
58    callback to store the current operation in a continuation that can
59    be resumed later.  While the continuation exists, file descriptors
60    associated with this operation must be removed from their
61    respective event loop.  or (B) a way for gpgme data objects to be
62    associated with a waitable object, that can be registered with the
63    user event loop.  Neither is particularly simple.
64 ** Extended notation support.  When gpg supports arbitrary binary
65    notation data, provide a user interface for that.
66 ** notification system
67    We need a simple notification system, probably a simple callback
68    with a string and some optional arguments.  This is for example
69    required to notify an application of a changed smartcard, The
70    application can then do whatever is required.  There are other
71    usages too.  This notfication system should be independent of any
72    contextes of course.
73
74    Not sure whether this is still required.  GPGME_PROTOCOL_ASSUAN is
75    sufficient for this.
76
77 ** --learn-code support
78    This might be integrated with import. we still need to work out how
79    to learn a card when gpg and gpgsm have support for smartcards.  In
80    GPA we currently invoke gpg directly.
81
82 ** Might need a stat() for data objects and use it for length param to gpg.
83 ** Implement support for photo ids.
84 ** Allow selection of subkeys
85 ** Allow to return time stamps in ISO format
86   This allows us to handle years later than 2037 properly.  With the
87   time_t interface they are all mapped to 2037-12-31
88 ** New features requested by our dear users, but rejected or left for
89    later consideration:
90 *** Allow to export secret keys.
91     Rejected because this is conceptually flawed.  Secret keys on a
92     smart card can not be exported, for example.
93     May eventually e supproted with a keywrapping system.
94 *** Selecting the key ring, setting the version or comment in output.
95     Rejected because the naive implementation is engine specific, the
96     configuration is part of the engine's configuration or readily
97     worked around in a different way
98 *** Selecting the symmetric cipher.
99 *** Exchanging keys with key servers.
100
101 * Documentation
102 ** Document validity and trust issues.
103 ** In gpgme.texi: Register callbacks under the right letter in the index.
104
105 * Engines
106 ** Do not create/destroy engines, but create engine and then reset it.
107    Internally the reset operation still spawns a new engine process,
108    but this can be replaced with a reset later.  Also, be very sure to
109    release everything properly at a reset and at an error.  Think hard
110    about where to guarantee what (ie, what happens if start fails, are
111    the fds unregistered immediately - i think so?)
112    Note that we need support in gpgsm to set include-certs to default
113    as RESET does not reset it, also for no_encrypt_to and probably
114    other options.
115 ** Optimize the case where a data object has an underlying fd we can pass
116    directly to the engine.  This will be automatic with socket I/O and
117    descriptor passing.
118 ** Move code common to all engines up from gpg to engine.
119 ** engine operations can return General Error on unknown protocol
120    (it's an internal error, as select_protocol checks already).
121 ** When server mode is implemented properly, more care has to be taken to
122    release all resources on error (for example to free assuan_cmd).
123 ** op_import_keys and op_export_keys have a limit ion the number of keys.
124    This is because we pass them in gpg via the command line and gpgsm
125    via an assuan control line.  We should pipe them instead and maybe
126    change gpg/gpgsm to not put them in memory.
127
128 * GPG breakage:
129 ** gpg 1.4.2 lacks error reporting if sign/encrypt with revoked key.
130 ** gpg 1.4.2 does crappy error reporting (namely none at all) when
131    smart card is missing for sign operation:
132     [GNUPG:] CARDCTRL 4
133     gpg: selecting openpgp failed: ec=6.110
134     gpg: signing failed: general error
135     [GNUPG:] BEGIN_ENCRYPTION 2 10
136     gpg: test: sign+encrypt failed: general error
137 ** Without agent and with wrong passphrase, gpg 1.4.2 enters into an
138    infinite loop.
139 ** Use correct argv[0]
140    In rungpg.c:build_argv we use
141       argv[argc] = strdup ("gpg"); /* argv[0] */
142    This should be changed to take the real file name used in account.
143
144
145 * Operations
146 ** Include cert values -2, -1, 0 and 1 should be defined as macros.
147 ** If an operation failed, make sure that the result functions don't return
148    corrupt partial information. !!!
149    NOTE: The EOF status handler is not called in this case !!!
150 ** Verify must not fail on NODATA premature if auto-key-retrieval failed.
151    It should not fail silently if it knows there is an error. !!!
152 ** All operations: Better error reporting. !!
153 ** Export status handler need much more work. !!!
154 ** Import should return a useful error when one happened.
155 *** Import does not take notice of NODATA status report.
156 *** When GPGSM does issue IMPORT_OK status reports, make sure to check for
157     them in tests/gpgs m/t-import.c.
158 ** Verify can include info about version/algo/class, but currently
159    this is only available for gpg, not gpgsm.
160 ** Return ENC_TO output in verify result.  Again, this is not available
161    for gpgsm.
162 ** Genkey should return something more useful than General_Error.
163 ** If possible, use --file-setsize to set the file size for proper progress
164    callback handling.  Write data interface for file size.
165 ** Optimize the file descriptor list, so the number of open fds is
166    always known easily.
167 ** Encryption: It should be verified that the behaviour for partially untrusted
168    recipients is correct.
169 ** When GPG issues INV_something for invalid signers, catch them.
170
171 * Error Values
172 ** Map ASSUAN/GpgSM ERR error values in a better way than is done now. !!
173 ** Some error values should identify the source more correctly (mostly error
174    values derived from status messages).
175 ** In rungpg.c we need to check the version of the engine
176    This requires a way to get the cached version number from the
177    engine layer.
178
179
180 * Tests
181 ** Write a fake gpg-agent so that we can supply known passphrases to
182    gpgsm and setup the configuration files to use the agent.  Without
183    this we are testing a currently running gpg-agent which is not a
184    clever idea. !
185 ** t-data
186 *** Test gpgme_data_release_and_get_mem.
187 *** Test gpgme_data_seek for invalid types.
188 ** t-keylist
189    Write a test for ext_keylist.
190 ** Test reading key signatures.
191
192 * Debug
193 ** Tracepoints should be added at: Every public interface enter/leave,
194    before and in every callback, at major decision points, at every
195    internal data point which might easily be observed by the outside
196    (system handles).  We also trace handles and I/O support threads in
197    the w32 implementation because that's fragile code.
198    Files left to do:
199    data-fd.c data-mem.c data-stream.c data-user.c debug.c rungpg.c
200    engine.c engine-gpgsm.c funopen.c w32-glib-io.c wait.c
201    wait-global.c wait-private.c wait-user.c op-support.c decrypt.c
202    decrypt-verify.c delete.c edit.c encrypt.c encrypt-sign.c export.c
203    genkey.c import.c key.c keylist.c passphrase.c progress.c signers.c
204    sig-notation.c trust-item.c trustlist.c verify.c
205 ** Handle malloc and vasprintf errors.  But decide first if they should be
206    ignored (and logged with 255?!), or really be assertions. !
207
208 * Build suite
209 ** Make sure everything is cleaned correctly (esp. test area).
210 ** Enable AC_CONFIG_MACRO_DIR and bump up autoconf version requirement.
211    (To fix "./autogen.sh; ./configure --enable-maintainer-mode; touch
212    configure.ac; make").  Currently worked around with ACLOCAL_AMFLAGS???
213
214 * Error checking 
215 ** engine-gpgsm, with-validation
216    Add error checking some time after releasing a new gpgsm.
217
218
219 Copyright 2004, 2005 g10 Code GmbH
220
221 This file is free software; as a special exception the author gives
222 unlimited permission to copy and/or distribute it, with or without
223 modifications, as long as this notice is preserved.
224
225 This file is distributed in the hope that it will be useful, but
226 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
227 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
228 PURPOSE.