diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2014-10-11 07:19:46 +0400 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2014-10-11 07:19:46 +0400 |
| commit | c4ca0177bdd6734501934ddfc088fe0d3b555b81 (patch) | |
| tree | fe882e7696936fcbc39017207b85b529adf8baac /tests/key.scm | |
| parent | ssh/log.scm (set-log-verbosity!, get-log-verbosity): New procedures (diff) | |
| download | guile-ssh-c4ca0177bdd6734501934ddfc088fe0d3b555b81.tar.gz | |
ssh/key.scm (make-keypair): New procedure
* ssh/key-type.c (_scm_from_ssh_key, guile_ssh_make_keypair): New
procedures.
* ssh/key-type.h: Update.
* ssh/key.scm (make-keypair): Export.
* doc/api-keys.texi (Keys): Add description of `make-keypair'.
* tests/key.scm ("make-keypair"): New TC.
* NEWS: Update.
Diffstat (limited to 'tests/key.scm')
| -rw-r--r-- | tests/key.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/key.scm b/tests/key.scm index 4ecb419..486efa0 100644 --- a/tests/key.scm +++ b/tests/key.scm @@ -122,6 +122,18 @@ (string=? (public-key->string (string->public-key %ecdsakey-pub-string 'ecdsa)) %ecdsakey-pub-string)))) +(test-assert "make-keypair" + (and (let ((key (make-keypair 'rsa 1024))) + (and (key? key) + (eq? (get-key-type key) 'rsa))) + (let ((key (make-keypair 'dss 1024))) + (and (key? key) + (eq? (get-key-type key) 'dss))) + (when-openssl + (let ((key (make-keypair 'ecdsa 256))) + (and (key? key) + (eq? (get-key-type key) 'ecdsa)))))) + ;;; (test-end "key") |
