Skip to content

Conversation

@nicolas-graves
Copy link

@nicolas-graves nicolas-graves commented Jun 3, 2025

This is corresponding to the current https://gitlab.com/libssh/libssh-mirror/-/merge_requests/536 (not merged yet, but I expect that to be soon enough).

Here's a usage example :

(use-modules (ssh key)
             (srfi srfi-26)
             (ice-9 textual-ports))

(define (public-keys-equal? pub1 pub2)
  (string=? (public-key->string pub1)
            (public-key->string pub2)))

(define rsakey (private-key-from-file "tests/keys/rsakey"))
(define test-string "Test input\0string")

(call-with-output-file "/tmp/message.sig"
  (cut format <> (sign test-string rsakey)))

(and=>
 (verify
  "Test input\0string"
  ;; "not a signature"
  (call-with-input-file "/tmp/message.sig" get-string-all))
 (cut public-keys-equal? rsakey <>))

@nicolas-graves
Copy link
Author

@artyom-poptsov The first commit can already be reviewed/merged, see https://codeberg.org/guix/guix/issues/113 for the reason why it's required.

@nicolas-graves
Copy link
Author

nicolas-graves commented Jul 22, 2025

@artyom-poptsov It's been merged upstream! Next steps here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants