|
PQS: Post Quantum Shell Protocol 1.1.0.0a (A2)
A quantum secure secure shell protocol
|
PQS server-side user database and passphrase verifier functions. More...
#include "pqs.h"Go to the source code of this file.
Data Structures | |
| struct | pqs_user_record |
| A PQS server user account record. More... | |
| struct | pqs_user_store |
| The fixed-size PQS server user database. More... | |
Typedefs | |
| typedef PQS_EXPORT_API struct pqs_user_record | pqs_user_record |
| typedef PQS_EXPORT_API struct pqs_user_store | pqs_user_store |
Functions | |
| PQS_EXPORT_API bool | pqs_user_store_add (pqs_user_store *store, const char *username, const char *passphrase, pqs_user_privileges privilege) |
| Add a user to the user database. | |
| PQS_EXPORT_API bool | pqs_user_store_enable (pqs_user_store *store, const char *username, bool enabled) |
| Disable or enable a user account. | |
| PQS_EXPORT_API const pqs_user_record * | pqs_user_store_find (const pqs_user_store *store, const char *username) |
| Find a user record by name. | |
| PQS_EXPORT_API pqs_user_record * | pqs_user_store_find_mutable (pqs_user_store *store, const char *username) |
| Find a mutable user record by name. | |
| PQS_EXPORT_API bool | pqs_user_store_initialize (pqs_user_store *store, const char *path) |
| Initialize and load the user database. | |
| PQS_EXPORT_API bool | pqs_user_store_remove (pqs_user_store *store, const char *username) |
| Remove a user from the user database. | |
| PQS_EXPORT_API bool | pqs_user_store_save (const pqs_user_store *store) |
| Save the user database to disk. | |
| PQS_EXPORT_API bool | pqs_user_store_set_privilege (pqs_user_store *store, const char *username, pqs_user_privileges privilege) |
| Set the user privilege level. | |
| PQS_EXPORT_API bool | pqs_user_store_set_shell_profile (pqs_user_store *store, const char *username, const char *shellprofile) |
| Set a user's assigned shell profile name. | |
| PQS_EXPORT_API bool | pqs_user_store_set_passphrase (pqs_user_store *store, const char *username, const char *passphrase) |
| Set a user's passphrase verifier. | |
| PQS_EXPORT_API bool | pqs_user_name_is_valid (const char *username) |
| Test whether a user name is valid for a PQS account and login request. | |
| PQS_EXPORT_API bool | pqs_user_passphrase_is_valid (const char *passphrase) |
| Test whether a passphrase length is valid for a PQS account and login request. | |
| PQS_EXPORT_API const char * | pqs_user_privilege_to_string (pqs_user_privileges privilege) |
| Convert a privilege level to its stable text name. | |
| PQS_EXPORT_API pqs_user_privileges | pqs_user_privilege_from_string (const char *value) |
| Convert a stable text name to a privilege level. | |
| PQS_EXPORT_API bool | pqs_user_verify_passphrase (const pqs_user_record *record, const char *passphrase) |
| Verify a plaintext passphrase against a user record. | |
| PQS_EXPORT_API bool | pqs_user_verify_passphrase_timing_neutral (const pqs_user_record *record, const char *username, const char *passphrase) |
| Verify a passphrase using a timing-neutral valid or dummy account path. | |
PQS server-side user database and passphrase verifier functions.
| PQS_EXPORT_API bool pqs_user_name_is_valid | ( | const char * | username | ) |
Test whether a user name is valid for a PQS account and login request.
| username | [const char*] The user name to validate. |
| PQS_EXPORT_API bool pqs_user_passphrase_is_valid | ( | const char * | passphrase | ) |
Test whether a passphrase length is valid for a PQS account and login request.
| passphrase | [const char*] The passphrase to validate. |
| PQS_EXPORT_API pqs_user_privileges pqs_user_privilege_from_string | ( | const char * | value | ) |
Convert a stable text name to a privilege level.
| value | [const char*] The privilege name. |
| PQS_EXPORT_API const char * pqs_user_privilege_to_string | ( | pqs_user_privileges | privilege | ) |
Convert a privilege level to its stable text name.
| privilege | [enum] The privilege level. |
| PQS_EXPORT_API bool pqs_user_store_add | ( | pqs_user_store * | store, |
| const char * | username, | ||
| const char * | passphrase, | ||
| pqs_user_privileges | privilege ) |
Add a user to the user database.
| store | [struct] The user database. |
| username | [const char*] The user name. |
| passphrase | [const char*] The plaintext passphrase used to create the SCB verifier. |
| privilege | [enum] The assigned privilege level. |
| PQS_EXPORT_API bool pqs_user_store_enable | ( | pqs_user_store * | store, |
| const char * | username, | ||
| bool | enabled ) |
Disable or enable a user account.
| store | [struct] The user database. |
| username | [const char*] The user name. |
| enabled | [bool] The requested enabled state. |
| PQS_EXPORT_API const pqs_user_record * pqs_user_store_find | ( | const pqs_user_store * | store, |
| const char * | username ) |
Find a user record by name.
| store | [const struct] The user database. |
| username | [const char*] The user name. |
| PQS_EXPORT_API pqs_user_record * pqs_user_store_find_mutable | ( | pqs_user_store * | store, |
| const char * | username ) |
Find a mutable user record by name.
| store | [struct] The user database. |
| username | [const char*] The user name. |
| PQS_EXPORT_API bool pqs_user_store_initialize | ( | pqs_user_store * | store, |
| const char * | path ) |
Initialize and load the user database.
| store | [struct] The user database. |
| path | [const char*] The database file path. |
| PQS_EXPORT_API bool pqs_user_store_remove | ( | pqs_user_store * | store, |
| const char * | username ) |
Remove a user from the user database.
| store | [struct] The user database. |
| username | [const char*] The user name. |
| PQS_EXPORT_API bool pqs_user_store_save | ( | const pqs_user_store * | store | ) |
Save the user database to disk.
| store | [const struct] The user database. |
| PQS_EXPORT_API bool pqs_user_store_set_passphrase | ( | pqs_user_store * | store, |
| const char * | username, | ||
| const char * | passphrase ) |
Set a user's passphrase verifier.
| store | [struct] The user database. |
| username | [const char*] The user name. |
| passphrase | [const char*] The new passphrase. |
| PQS_EXPORT_API bool pqs_user_store_set_privilege | ( | pqs_user_store * | store, |
| const char * | username, | ||
| pqs_user_privileges | privilege ) |
Set the user privilege level.
| store | [struct] The user database. |
| username | [const char*] The user name. |
| privilege | [enum] The requested privilege level. |
| PQS_EXPORT_API bool pqs_user_store_set_shell_profile | ( | pqs_user_store * | store, |
| const char * | username, | ||
| const char * | shellprofile ) |
Set a user's assigned shell profile name.
| store | [struct] The user database. |
| username | [const char*] The user name. |
| shellprofile | [const char*] The shell profile name. |
| PQS_EXPORT_API bool pqs_user_verify_passphrase | ( | const pqs_user_record * | record, |
| const char * | passphrase ) |
Verify a plaintext passphrase against a user record.
| record | [const struct] The user record. |
| passphrase | [const char*] The plaintext passphrase. |
| PQS_EXPORT_API bool pqs_user_verify_passphrase_timing_neutral | ( | const pqs_user_record * | record, |
| const char * | username, | ||
| const char * | passphrase ) |
Verify a passphrase using a timing-neutral valid or dummy account path.
| record | [const struct] The user record, or NULL for an unknown account. |
| username | [const char*] The requested user name used for the dummy verifier path. |
| passphrase | [const char*] The plaintext passphrase. |