- 
Committer:
Teddy Hogeborn
- 
Date:
2021-03-21 20:46:40 UTC
- 
Revision ID:
teddy@recompile.se-20210321204640-lpsyen8jr9lw1jma
Some cleanup of GnuTLS interface
Rename opaque internal GnuTLS structures named *_int to also start
with underscore (_), as is the custom in Python programs.
Decode byte strings from UTF-8 where needed.  (Fixing, among other
things, all "DEBUG: GnuTLS" lines having a "b'" prefix in Python 3.)
Simplify calling C functions by:
1. Using the "_as_parameter_" attribute to store the ctypes object.
2. Creating and using helper classes to automatically create pointers
   or cast typed pointers to pointers to void.
3. Providing the "from_param()" method on relevant classes.
Remove "restype" attribute on C functions where "errcheck" attribute
is already set.
* mandos (gnutls.session_int): Rename to start with "_".
  (gnutls.openpgp_crt_int): - '' -
  (gnutls.Error.__init__): Decode byte string from gnutls.strerror().
  (gnutls.PointerTo): New helper class.
  (gnutls.CastToVoidPointer): - '' -
  (gnutls.With_from_param): - '' -
  (gnutls.Credentials): Inherit from "With_from_param" and store the
  ctypes object in the "_as_parameter_" attribute instead of
  "_c_object".
  (gnutls._error_code): Use "gnutls.E_SUCCESS" instead of the unadorned
  numerical constant "0".
  (gnutls._retry_on_error): - '' -
  (gnutls.priority_set_direct.argtypes): Use "ClientSession" instead
  of "session_t", and change all callers to match.
  (gnutls.init.argtypes): Use "PointerTo(ClientSession)" instead of
  "ctypes.POINTER(session_t)", and change all callers to match.
  (gnutls.set_default_priority.argtypes): Use "ClientSession" instead
  of "session_t", and change all callers to match.
  (gnutls.record_send.argtypes): - '' -
  (gnutls.certificate_allocate_credentials.argtypes): Use
  "PointerTo(Credentials)" instead of
  "ctypes.POINTER(certificate_credentials_t)", and change all callers
  to match.
  (gnutls.certificate_free_credentials.argtypes): Use "Credentials"
  instead of "certificate_credentials_t", and change all callers to
  match.
  (gnutls.handshake_set_private_extensions.argtypes): Use
  "ClientSession" instead of "session_t", and change all callers to
  match.
  (gnutls.credentials_set.argtypes): Use
  "CastToVoidPointer(Credentials)" instead of "ctypes.c_void_p", and
  change all callers to match.
  (gnutls.certificate_type_get.argtypes): Use "ClientSession" instead
  of "session_t", and change all callers to match.
  (gnutls.certificate_get_peers.argtypes): - '' -
  (gnutls.deinit.argtypes): - '' -
  (gnutls.handshake.argtypes): - '' -
  (gnutls.handshake.restype): Change from "_error_code" to
  "ctypes.c_int".
  (gnutls.transport_set_ptr.argtypes): Use "ClientSession" instead of
  "session_t", and change all callers to match.
  (gnutls.bye.argtypes): - '' -
  (gnutls.bye.restype): Change from "_error_code" to "ctypes.c_int".
  (gnutls.certificate_type_get2.argtypes): Use "ClientSession" instead
  of "session_t", and change all callers to match.
  (ClientHandler.handle): Decode "key_id" bytes to string before
  logging it in the debug log.
  (main.debug_gnutls): Decode GnuTLS log message from bytes to string
  before logging it in the debug log.
 
 
|  .. | 
|  .bzr-builddeb | 185 | 17 years ago | Teddy Hogeborn | * .bzr-builddeb/default.conf: New.
* Makefile (in |  |   |  | 
|  debian | 185 | 17 years ago | Teddy Hogeborn | * .bzr-builddeb/default.conf: New.
* Makefile (in |  |   |  | 
|  dracut-module | 1127 | 6 years ago | Teddy Hogeborn | Add dracut(8) support
Add support for the dracut( |  |   |  | 
|  network-hooks.d | 505.3.10 | 13 years ago | Teddy Hogeborn | * network-hooks.d: New directory.
* network-hooks. |  |   |  | 
|  plugin-helpers | 738.1.1 | 10 years ago | Teddy Hogeborn | Add a plugin helper directory, available to all pl |  |   |  | 
|  plugins.d | 13 | 17 years ago | Björn Påhlsson | Added following support:
Pluginbased client handle |  |   |  | 
|  .bzrignore | 1193 | 5 years ago | teddy at recompile | Remove non-project-specific pattern from .bzrignor | 260 bytes |   |   | 
|  bugs.xml | 821 | 9 years ago | Teddy Hogeborn | Add bug reporting information to manual pages
* b | 539 bytes |   |   | 
|  clients.conf | 964 | 6 years ago | Teddy Hogeborn | Doc fix: Change some "/etc/mandos" to "/etc/keys/m | 3.3 KB |   |   | 
|  common.ent | 237.4.136 | 4 years ago | Teddy Hogeborn | Version 1.8.14-1
* Makefile (version): Change to | 94 bytes |   |   | 
|  COPYING | 24.1.51 | 17 years ago | Björn Påhlsson | Added configuration files support for mandos-clien | 34.2 KB |   |   | 
|  DBUS-API | 1218 | 5 years ago | teddy at recompile | Update copyright year
* DBUS-API: Update copyrigh | 5.9 KB |   |   | 
|  dbus-mandos.conf | 24.1.186 | 14 years ago | Björn Påhlsson | transitional stuff actually working
documented cha | 820 bytes |   |   | 
|  default-mandos | 185 | 17 years ago | Teddy Hogeborn | * .bzr-builddeb/default.conf: New.
* Makefile (in | 174 bytes |   |   | 
|  init.d-mandos | 927 | 7 years ago | Teddy Hogeborn | Remove unnecessary text left from old example init | 4.2 KB |   |   | 
|  initramfs-tools-conf | 954 | 7 years ago | Teddy Hogeborn | Move UMASK setting to more proper place
* Makefil | 695 bytes |   |   | 
|  initramfs-tools-conf-hook | 1099 | 6 years ago | Teddy Hogeborn | Installation: Fix UMASK even if set by some other | 647 bytes |   |   | 
|  initramfs-tools-hook | 1208 | 5 years ago | teddy at recompile | initramfs-tools-hook: Properly quote argument to t | 7.6 KB |   |   | 
|  initramfs-tools-script | 1215 | 5 years ago | teddy at recompile | In initramfs-tools boots, only use setsid when ava | 4.6 KB |   |   | 
|  initramfs-tools-script-stop | 956 | 7 years ago | Teddy Hogeborn | Set executable permissions on new files
* initram | 1.8 KB |   |   | 
|  initramfs-unpack | 1127 | 6 years ago | Teddy Hogeborn | Add dracut(8) support
Add support for the dracut( | 2.7 KB |   |   | 
|  INSTALL | 1186 | 5 years ago | Teddy Hogeborn | INSTALL: Add "-" argument to "su" invocations. | 5.8 KB |   |   | 
|  intro.xml | 1234 | 4 years ago | Teddy Hogeborn | Update copyright year
* debian/copyright: Update | 17.9 KB |   |   | 
|  legalnotice.xml | 907 | 8 years ago | Teddy Hogeborn | Alter copyright notices slightly.  Actual license | 1 KB |   |   | 
|  Makefile | 1240 | 4 years ago | Teddy Hogeborn | Use _FORTIFY_SOURCE=3, supported by GNU C Library | 21.8 KB |   |   | 
|  mandos | 1243 | 4 years ago | Teddy Hogeborn | Some cleanup of GnuTLS interface
Rename opaque in | 145 KB |   |   | 
|  mandos-clients.conf.xml | 969 | 6 years ago | Teddy Hogeborn | Update copyright year to 2019
* DBUS-API: Update | 19.4 KB |   |   | 
|  mandos-ctl | 1237 | 4 years ago | Teddy Hogeborn | mandos-ctl: Fix bad test for command.Remove and re | 107 KB |   |   | 
|  mandos-ctl.xml | 1131 | 6 years ago | Teddy Hogeborn | Make tests and man page examples match
Make the t | 17.8 KB |   |   | 
|  mandos-keygen | 237.4.136 | 4 years ago | Teddy Hogeborn | Version 1.8.14-1
* Makefile (version): Change to | 12.6 KB |   |   | 
|  mandos-keygen.xml | 1120 | 6 years ago | Teddy Hogeborn | Document bug in mandos-keygen which strips white s | 16.8 KB |   |   | 
|  mandos-monitor | 237.4.136 | 4 years ago | Teddy Hogeborn | Version 1.8.14-1
* Makefile (version): Change to | 29.3 KB |   |   | 
|  mandos-monitor.xml | 969 | 6 years ago | Teddy Hogeborn | Update copyright year to 2019
* DBUS-API: Update | 6.3 KB |   |   | 
|  mandos-options.xml | 1123 | 6 years ago | Teddy Hogeborn | Use hexadecimal unicode character references, not | 5.1 KB |   |   | 
|  mandos-to-cryptroot-unlock | 1218 | 5 years ago | teddy at recompile | Update copyright year
* DBUS-API: Update copyrigh | 2.5 KB |   |   | 
|  mandos.conf | 777 | 10 years ago | Teddy Hogeborn | Bug fix for GnuTLS 3: be compatible with old 2048- | 1.6 KB |   |   | 
|  mandos.conf.xml | 1106 | 6 years ago | Teddy Hogeborn | Doc fix: Use new style interface names instead of | 8.9 KB |   |   | 
|  mandos.lsm | 237.4.136 | 4 years ago | Teddy Hogeborn | Version 1.8.14-1
* Makefile (version): Change to | 910 bytes |   |   | 
|  mandos.service | 1203 | 5 years ago | teddy at recompile | Allow users to more easily alter mandos.service
T | 1.2 KB |   |   | 
|  mandos.xml | 1121 | 6 years ago | Teddy Hogeborn | Change URL for Avahi to use HTTPS
* INSTALL (Prer | 24.1 KB |   |   | 
|  NEWS | 237.4.136 | 4 years ago | Teddy Hogeborn | Version 1.8.14-1
* Makefile (version): Change to | 21.5 KB |   |   | 
|  overview.xml | 962 | 6 years ago | Teddy Hogeborn | Add support for using raw public keys in TLS (RFC | 923 bytes |   |   | 
|  plugin-runner.c | 1241 | 4 years ago | Teddy Hogeborn | Break long line (white space change only)
* plugi | 36.3 KB |   |   | 
|  plugin-runner.conf | 342 | 16 years ago | Teddy Hogeborn | * initramfs-tools-hook: Bug fix: Add "--userid" an | 380 bytes |   |   | 
|  plugin-runner.xml | 1124 | 6 years ago | Teddy Hogeborn | Allow line breaks on long lines in plugin-runner m | 22.6 KB |   |   | 
|  README | 844 | 9 years ago | Teddy Hogeborn | Use HTTPS in home page links
Since we have a real | 410 bytes |   |   | 
|  sysusers.d-mandos.conf | 1160 | 6 years ago | Teddy Hogeborn | Client: Use the systemd sysusers.d mechanism, if p | 167 bytes |   |   | 
|  tmpfiles.d-mandos.conf | 838 | 9 years ago | Teddy Hogeborn | Server: New tmpfiles.d file for persistent state d | 38 bytes |   |   | 
|  TODO | 1206 | 5 years ago | teddy at recompile | Update formatting in TODO file
* TODO: Add markup | 4.9 KB |   |   |