]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
guile: tests: Use `port->fdes' rather than `fileno'.
authorLudovic Courtès <ludo@gnu.org>
Thu, 27 Jun 2013 22:39:35 +0000 (00:39 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 27 Jun 2013 22:43:35 +0000 (00:43 +0200)
This has no practical impact, but it's a better way to express that we
don't want the file descriptors closed behind our back.

guile/tests/anonymous-auth.scm
guile/tests/openpgp-auth.scm
guile/tests/x509-auth.scm

index 53c8ce0cbb3990cdd01ae4f223b005b4545ebb6b..ded0c63c0b8bdf714f7c887d375396fe2da4877d 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GnuTLS --- Guile bindings for GnuTLS.
-;;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
 ;;;
 ;;; GnuTLS is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU Lesser General Public
@@ -61,7 +61,7 @@
               ;; client-side (child process)
               (set-session-priorities! client priorities)
 
-              (set-session-transport-fd! client (fileno (car socket-pair)))
+              (set-session-transport-fd! client (port->fdes (car socket-pair)))
               (set-session-credentials! client (make-anonymous-client-credentials))
               (set-session-dh-prime-bits! client 1024)
 
@@ -75,7 +75,7 @@
               ;; server-side
               (set-session-priorities! server priorities)
 
-              (set-session-transport-fd! server (fileno (cdr socket-pair)))
+              (set-session-transport-fd! server (port->fdes (cdr socket-pair)))
               (let ((cred (make-anonymous-server-credentials))
                     (dh-params (import-dh-params "dh-parameters.pem")))
                 ;; Note: DH parameter generation can take some time.
index d4f242efb2175b4892366752a37eb59f9933ac9b..286a0e3873135f9cf2abd8e3cc28e68ca7677f11 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GnuTLS-extra --- Guile bindings for GnuTLS-EXTRA.
-;;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
 ;;;
 ;;; GnuTLS-extra is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@
                 (set-session-credentials! client cred)
                 (set-session-dh-prime-bits! client 1024)
 
-                (set-session-transport-fd! client (fileno (car socket-pair)))
+                (set-session-transport-fd! client (port->fdes (car socket-pair)))
 
                 (handshake client)
                 (write %message (session-record-port client))
@@ -94,7 +94,7 @@
                 (set-server-session-certificate-request! server
                          certificate-request/require)
 
-                (set-session-transport-fd! server (fileno (cdr socket-pair)))
+                (set-session-transport-fd! server (port->fdes (cdr socket-pair)))
                 (let ((cred (make-certificate-credentials)))
                   (set-certificate-credentials-dh-parameters! cred dh)
                   (set-certificate-credentials-rsa-export-parameters! cred rsa)
index 52fd6592cedc01e65477920e73644e9f330e3994..1a00790bc6320c527511d20fef8b234df325f70f 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GnuTLS --- Guile bindings for GnuTLS.
-;;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
 ;;;
 ;;; GnuTLS is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU Lesser General Public
@@ -87,7 +87,7 @@
                 (set-session-credentials! client cred)
                 (set-session-dh-prime-bits! client 1024)
 
-                (set-session-transport-fd! client (fileno (car socket-pair)))
+                (set-session-transport-fd! client (port->fdes (car socket-pair)))
 
                 (handshake client)
                 (write %message (session-record-port client))
                 (set-server-session-certificate-request! server
                          certificate-request/require)
 
-                (set-session-transport-fd! server (fileno (cdr socket-pair)))
+                (set-session-transport-fd! server (port->fdes (cdr socket-pair)))
                 (let ((cred (make-certificate-credentials))
                       (trust-file (search-path %load-path
                                                "x509-certificate.pem"))