3.4 Source tree

This section gives an overview of the source code organization. It is of interest for those writing new modules and playing with the library internals.

The source tree is organized as follows:

The library core and service modules contain the state machines and protocol related stuff:

Then come the algorithms negotiated during the key-exchange process. Some of these pluggable modules are standalone and others are linked to an external libraries:

Some additional pluggable utility components are used by the library core and modules:

  • src/key*.c : SSH keys management modules.

  • src/prng*.c : Random number generation modules.

  • src/hash*.c : Hash functions modules.

  • src/bignum*.c : A constant time big number engine.

Some helper functions are provided for convenience. Unlike other parts of the library, these files contains system calls and platform specific stuff. It is not used by the other parts of the library and are only provided for use by the application. They don't rely on the private APIs of the library:

  • src/helper_client.c : This provides event handlers for common ssh client behavior.

  • src/helper_server.c : This provides event handlers for common ssh server behavior.

  • src/helper_key.c : This provides SSH key file loading and saving functions.

  • src/helper_base64.c : This implements a base64 encoder and decoder for use by SSH key helpers.

  • src/helper_bcrypt.c : This provides the encryption algorithm used for passphrase protected keys in OpenSSH formats.

  • src/helper_io.c : This provides IO events handler relying on POSIX file descriptors.

  • src/helper_interactive.c : This implements interactive session related features.

  • src/helper_portfwd.c : This implements port forwarding related features.

See associated header files for details of the helpers API.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:30:45 2020 using MkDoc