summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-12-04 22:15:16 +0100
committerLudovic Courtès <ludo@gnu.org>2014-12-12 14:15:41 +0100
commit9f5788469f6f3f3fdd4cf064621a903607f10f2f (patch)
tree5fb053a88a63bca9638d52394c59ee27478c094d /doc
parentbb436b1a8ea5fb8e3847507a867a24d122405d4d (diff)
downloadgnutls-9f5788469f6f3f3fdd4cf064621a903607f10f2f.tar.gz
guile: Remove RSA parameters and related procedures.
* guile/modules/gnutls/build/smobs.scm (%rsa-parameters-smob): Remove. (%gnutls-smobs): Remove it. * guile/src/core.c (scm_gnutls_make_rsa_parameters, scm_gnutls_pkcs1_import_rsa_parameters, scm_gnutls_pkcs1_export_rsa_parameters, scm_gnutls_set_certificate_credentials_rsa_export_params_x): Remove. * guile/modules/gnutls.in: Adjust export list. * guile/tests/openpgp-auth.scm (import-rsa-params): Remove. Remove references to it and to 'set-certificate-credentials-rsa-export-parameters!'. * guile/tests/x509-auth.scm: Likewise. * doc/gnutls-guile.texi (Representation of Binary Data): Remove references to RSA parameters. Adjust example accordingly. (OpenPGP Authentication Guile Example): Likewise.
Diffstat (limited to 'doc')
-rw-r--r--doc/gnutls-guile.texi31
1 files changed, 12 insertions, 19 deletions
diff --git a/doc/gnutls-guile.texi b/doc/gnutls-guile.texi
index 1bbec357dd..6308630a32 100644
--- a/doc/gnutls-guile.texi
+++ b/doc/gnutls-guile.texi
@@ -287,9 +287,7 @@ procedure applies to session.
@section Representation of Binary Data
Many procedures operate on binary data. For instance,
-@code{pkcs3-import-dh-parameters} expects binary data as input and,
-similarly, procedures like @code{pkcs1-export-rsa-parameters} return
-binary data.
+@code{pkcs3-import-dh-parameters} expects binary data as input.
@cindex SRFI-4
@cindex homogeneous vector
@@ -299,19 +297,20 @@ vectors (@pxref{SRFI-4,,, guile, The GNU Guile Reference Manual}).
Although any type of homogeneous vector may be used, @code{u8vector}s
(i.e., vectors of bytes) are highly recommended.
-As an example, generating and then exporting RSA parameters in the PEM
-format can be done as follows:
+As an example, generating and then exporting Diffie-Hellman parameters
+in the PEM format can be done as follows:
-@findex make-rsa-parameters
-@findex pkcs1-export-rsa-parameters
+@findex make-dh-parameters
+@findex pkcs3-export-dh-parameters
@vindex x509-certificate-format/pem
@example
-(let* ((rsa-params (make-rsa-parameters 1024))
- (raw-data
- (pkcs1-export-rsa-parameters rsa-params
- x509-certificate-format/pem)))
- (uniform-vector-write raw-data (open-output-file "some-file.pem")))
+(let* ((dh (make-dh-parameters 1024))
+ (pem (pkcs3-export-dh-parameters dh
+ x509-certificate-format/pem)))
+ (call-with-output-file "some-file.pem"
+ (lambda (port)
+ (uniform-vector-write pem port))))
@end example
For an example of OpenPGP key import from a file, see @ref{Importing
@@ -580,7 +579,6 @@ Similarly, server-side code would be along these lines:
(define %certs (list certificate-type/openpgp))
(let ((server (make-session connection-end/server))
- (rsa (make-rsa-parameters 1024))
(dh (make-dh-parameters 1024)))
(set-session-default-priority! server)
@@ -588,9 +586,8 @@ Similarly, server-side code would be along these lines:
(set-session-certificate-type-priority! server %certs)
(let ((cred (make-certificate-credentials)))
- ;; Prepare credentials with RSA and Diffie-Hellman parameters.
+ ;; Prepare credentials with Diffie-Hellman parameters.
(set-certificate-credentials-dh-parameters! cred dh)
- (set-certificate-credentials-rsa-export-parameters! cred rsa)
(set-certificate-credentials-openpgp-keys! cred pub sec)
(set-session-credentials! server cred))
@@ -603,10 +600,6 @@ Similarly, server-side code would be along these lines:
(bye server close-request/rdwr)))
@end example
-In practice, generating RSA parameters (and Diffie-Hellman parameters)
-can time a long time. Thus, you may want to generate them once and
-store them in a file for future re-use (@pxref{Guile Reference,
-@code{pkcs1-export-rsa-parameters} and @code{pkcs1-import-rsa-parameters}}).
@node Importing OpenPGP Keys Guile Example
@section Importing OpenPGP Keys Guile Example