Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates docs for rust functions #155

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [unreleased]

## [0.15.0] - 2024-09-26

### Fixed

- Fixes #140, updates dependencies.
Expand Down
19 changes: 13 additions & 6 deletions docs/rustimplementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,24 @@ In most cases you don't have to use these, but if you have a reason, feel free t
>>> rjce.get_key_cipher_details(key.keyvalue)
[('F4F388BBB194925AE301F844C52B42177857DD79', 'EdDSA', 256), ('102EBD23BD5D2D340FBBDE0ADFD1C55926648D2F', 'EdDSA', 256), ('85B67F139D835FA56BA703DB5A7A1560D46ED4F6', 'ECDH', 256)]

.. function:: update_primary_expiry_on_card(certdata: bytes, expiry: int, pin: bytes) -> bytes:
.. function:: update_subkeys_expiry_in_cert(certdata: bytes, fingerprints: List[str], expirytime: int, password: string) -> bytes:

This function updates the expiry date using the Yubikey and public key as `certdata`. You will have to pass the expiry as `int` number of seconds (after which the key will expire).
This function updates the expiry date of the given subkeys and returns the new certificate.

.. versionadded:: 0.15.0
.. function:: revoke_uid_in_cert(certdata: bytes, uid: bytes, password: string) -> bytes:

.. function:: update_subkeys_expiry_on_card(certdata: bytes, fingerprints: List[str], expiry: int, pin: bytes) -> bytes:
Revokes the given UID in the key and returns the new key with the revoked UID.


.. function:: add_uid_in_cert(certdata: bytes, uid: bytes, password: string) -> bytes:

Adds the given UID in the key and returns the new key.

.. function:: update_password(certdata: bytes, password: str, newpass: str) -> bytes:

Updates the password of the key to a new password and then returns the updated key.

This function updates the expiry date of the given subkeys using Yubikey (the primary key must be on the Yubikey). You will have to pass the expiry as `int` number of seconds (after which the key will expire).

.. versionadded:: 0.15.0

.. class:: Johnny(filepath)

Expand Down
13 changes: 13 additions & 0 deletions docs/smartcard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ Smartcard API

Signs the given filepath and writes to output. Also requires the the public in `certdata` argument. For things like email, you would want to sign them in clear text.

.. function:: update_primary_expiry_on_card(certdata: bytes, expiry: int, pin: bytes) -> bytes:

This function updates the expiry date using the Yubikey and public key as `certdata`. You will have to pass the expiry as `int` number of seconds (after which the key will expire).

.. versionadded:: 0.15.0

.. function:: update_subkeys_expiry_on_card(certdata: bytes, fingerprints: List[str], expiry: int, pin: bytes) -> bytes:

This function updates the expiry date of the given subkeys using Yubikey (the primary key must be on the Yubikey). You will have to pass the expiry as `int` number of seconds (after which the key will expire).

.. versionadded:: 0.15.0


.. function:: upload_to_smartcard(certdata: bytes, pin: bytes, password: str, whichkeys: int) -> bool:

Uploads the marked (via whichkeys argument) subkeys to the smartcard. Takes the whole certdata (from `Key.keyvalue`) in bytes, and the admin pin of the card, the password (as string) of
Expand Down
Loading