![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/gnustep-base-doc/Base/Reference/ |
Upload File : |
<?xml version="1.0"?> <!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.4//EN" "http://www.gnustep.org/gsdoc-1_0_4.dtd"> <gsdoc base="NSFileHandle" up="Base"> <head> <title>NSFileHandle class reference</title> <author name="Richard Frith-Macdonald"> <email address="richard@brainstorm.co.uk"> richard@brainstorm.co.uk </email> </author> <copy>1997 Free Software Foundation, Inc.</copy> </head> <body> <front><contents /></front> <chapter> <heading> Software documentation for the NSFileHandle class </heading> <class name="NSFileHandle" super="NSObject" ovadd="1.0.0"> <declared>Foundation/NSFileHandle.h</declared> <desc> <p> <code>NSFileHandle</code> is a class that provides a wrapper for accessing system files and socket connections. You can open connections to a file using class methods such as <ref type="method" id="+fileHandleForReadingAtPath:"> +fileHandleForReadingAtPath: </ref> . </p> <p> GNUstep extends the use of this class to allow you to create network connections (sockets), secure connections and also allows you to use compression with these files and connections (as <strong>long</strong> as GNUstep Base was compiled with the zlib library). </p> </desc> <method type="id" factory="yes" ovadd="1.0.0"> <sel>fileHandleForReadingAtPath:</sel> <arg type="NSString*">path</arg> <desc> Returns an <code>NSFileHandle</code> object set up for reading from the file listed at <var>path</var>. If the file does not exist or cannot be opened for some other reason, <code>nil</code> is returned. </desc> </method> <method type="id" factory="yes" ovadd="1.0.0"> <sel>fileHandleForUpdatingAtPath:</sel> <arg type="NSString*">path</arg> <desc> Returns an <code>NSFileHandle</code> object setup for updating (reading and writing) from the file listed at <var>path</var>. If the file does not exist or cannot be opened for some other reason, <code>nil</code> is returned. </desc> </method> <method type="id" factory="yes" ovadd="1.0.0"> <sel>fileHandleForWritingAtPath:</sel> <arg type="NSString*">path</arg> <desc> Returns an <code>NSFileHandle</code> object set up for writing to the file listed at <var>path</var>. If the file does not exist or cannot be opened for some other reason, <code>nil</code> is returned. </desc> </method> <method type="id" factory="yes" ovadd="1.0.0"> <sel>fileHandleWithNullDevice</sel> <desc> Returns a file handle object that is connected to the null device (i.e. a device that does nothing.) It is typically used in arrays and other collections of file handle objects as a place holder (null) object, so that all objects can respond to the same messages. </desc> </method> <method type="id" factory="yes" ovadd="1.0.0"> <sel>fileHandleWithStandardError</sel> <desc> Returns an <code>NSFileHandle</code> object for the standard error descriptor. The returned object is a shared instance as there can only be one standard error per process. </desc> </method> <method type="id" factory="yes" ovadd="1.0.0"> <sel>fileHandleWithStandardInput</sel> <desc> Returns an <code>NSFileHandle</code> object for the standard input descriptor. The returned object is a shared instance as there can only be one standard input per process. </desc> </method> <method type="id" factory="yes" ovadd="1.0.0"> <sel>fileHandleWithStandardOutput</sel> <desc> Returns an <code>NSFileHandle</code> object for the standard output descriptor. The returned object is a shared instance as there can only be one standard output per process. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>acceptConnectionInBackgroundAndNotify</sel> <desc> Asynchronously accept a stream-type socket connection and act as the (server) end of the communications channel. This instance should have been created by <ref type="method" id="-initWithFileDescriptor:"> -initWithFileDescriptor: </ref> with a stream-type socket created by the appropriate system routine. Posts a <code> NSFileHandleConnectionAcceptedNotification </code> when connection initiated, returning an <code>NSFileHandle</code> for the client side with that notification. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>acceptConnectionInBackgroundAndNotifyForModes:</sel> <arg type="NSArray*">modes</arg> <desc> <p> Asynchronously accept a stream-type socket connection and act as the (server) end of the communications channel. This instance should have been created by <ref type="method" id="-initWithFileDescriptor:"> -initWithFileDescriptor: </ref> with a stream-type socket created by the appropriate system routine. Posts a <code> NSFileHandleConnectionAcceptedNotification </code> when connection initiated, returning an <code>NSFileHandle</code> for the client side with that notification. </p> <p> The <var>modes</var> array specifies <ref type="class" id="NSRunLoop">NSRunLoop</ref> <var>modes</var> that the notification can be posted in. </p> </desc> </method> <method type="NSData*" ovadd="1.0.0"> <sel>availableData</sel> <desc> Synchronously returns data available through this file or connection. If the handle represents a file, the entire contents from current file pointer to end are returned. If this is a network connection, reads what is available, blocking if nothing is available. Raises <code>NSFileHandleOperationException</code> if problem encountered. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>closeFile</sel> <desc> Disallows further reading from read-access files or connections, and sends EOF on write-access files or connections. Descriptor is only <em>deleted</em> when this instance is deallocated. </desc> </method> <method type="int" ovadd="1.0.0"> <sel>fileDescriptor</sel> <desc> Return the underlying file descriptor for this instance. </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithFileDescriptor:</sel> <arg type="int">desc</arg> <desc> Initialize with <var>desc</var>, which can point to either a regular file or socket connection. </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithFileDescriptor:</sel> <arg type="int">desc</arg> <sel>closeOnDealloc:</sel> <arg type="BOOL">flag</arg> <desc> Initialize with <var>desc</var>, which can point to either a regular file or socket connection. Close <var>desc</var> when this instance is deallocated if <var>flag</var> is <code>YES</code>. </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithNativeHandle:</sel> <arg type="void*">hdl</arg> <desc> Windows-Unix compatibility support. </desc> </method> <method type="id" init="yes" ovadd="1.0.0"> <sel>initWithNativeHandle:</sel> <arg type="void*">hdl</arg> <sel>closeOnDealloc:</sel> <arg type="BOOL">flag</arg> <desc> Windows-Unix compatibility support. </desc> </method> <method type="void*" ovadd="1.0.0"> <sel>nativeHandle</sel> <desc> Windows-Unix compatibility support. </desc> </method> <method type="unsigned long long" ovadd="1.0.0"> <sel>offsetInFile</sel> <desc> Return current position in file, or raises exception if instance does not represent a regular file. </desc> </method> <method type="NSData*" ovadd="1.0.0"> <sel>readDataOfLength:</sel> <arg type="unsigned int">len</arg> <desc> Reads up to <var>len</var> bytes from file or communications channel into return data. </desc> </method> <method type="NSData*" ovadd="1.0.0"> <sel>readDataToEndOfFile</sel> <desc> Reads up to maximum <strong>unsigned</strong> <strong>int</strong> bytes from file or communications channel into return data. <br /> If the file is empty, returns an empty data item. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>readInBackgroundAndNotify</sel> <desc> Call <ref type="method" id="-readInBackgroundAndNotifyForModes:">-readInBackgroundAndNotifyForModes:</ref> with <code>nil</code> modes. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>readInBackgroundAndNotifyForModes:</sel> <arg type="NSArray*">modes</arg> <desc> Set up an asynchronous read operation which will cause a notification to be sent when any amount of data (or end of file) is read. Note that the file handle will not continuously send notifications when data is available. If you want to continue to receive notifications, you need to send this message again after receiving a notification. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>readToEndOfFileInBackgroundAndNotify</sel> <desc> Call <ref type="method" id="-readToEndOfFileInBackgroundAndNotifyForModes:">-readToEndOfFileInBackgroundAndNotifyForModes:</ref> with <code>nil</code> modes. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>readToEndOfFileInBackgroundAndNotifyForModes:</sel> <arg type="NSArray*">modes</arg> <desc> Set up an asynchronous read operation which will cause a notification to be sent when end of file is read. </desc> </method> <method type="unsigned long long" ovadd="1.0.0"> <sel>seekToEndOfFile</sel> <desc> Position file pointer at end of file, raising exception if instance does not represent a regular file. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>seekToFileOffset:</sel> <arg type="unsigned long long">pos</arg> <desc> Position file pointer at <var>pos</var>, raising exception if instance does not represent a regular file. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>synchronizeFile</sel> <desc> Flush in-memory buffer to file or connection, then return. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>truncateFileAtOffset:</sel> <arg type="unsigned long long">pos</arg> <desc> Chops file beyond <var>pos</var> then sets file pointer to that point. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>waitForDataInBackgroundAndNotify</sel> <desc> Call <ref type="method" id="-waitForDataInBackgroundAndNotifyForModes:">-waitForDataInBackgroundAndNotifyForModes:</ref> with <code>nil</code> modes. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>waitForDataInBackgroundAndNotifyForModes:</sel> <arg type="NSArray*">modes</arg> <desc> Set up to provide a notification when data can be read from the handle. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>writeData:</sel> <arg type="NSData*">item</arg> <desc> Synchronously writes given data <var>item</var> to file or connection. </desc> </method> </class> </chapter> <chapter> <heading> Software documentation for the NSPipe class </heading> <class name="NSPipe" super="NSObject" ovadd="1.0.0"> <declared>Foundation/NSFileHandle.h</declared> <desc> <p> The NSPipe provides an encapsulation of the UNIX concept of pipe. <br /> With NSPipe, it is possible to redirect the standard input or standard output. </p> <p> The file handles created by NSPipe are automatically closed when they are no longer in use (ie when the NSPipe instance is deallocated), so you don't need to close them explicitly. </p> </desc> <method type="id" factory="yes" ovadd="1.0.0"> <sel>pipe</sel> <desc> Returns a newly allocated and initialized NSPipe object that has been sent an autorelease message. </desc> </method> <method type="NSFileHandle*" ovadd="1.0.0"> <sel>fileHandleForReading</sel> <desc> Returns the file handle for reading from the pipe. </desc> </method> <method type="NSFileHandle*" ovadd="1.0.0"> <sel>fileHandleForWriting</sel> <desc> Returns the file handle for writing to the pipe. </desc> </method> </class> </chapter> <chapter> <heading> Software documentation for the NSFileHandle(GNUstepExtensions) category </heading> <category name="GNUstepExtensions" class="NSFileHandle" ovadd="0.0.0" ovrem="0.0.0"> <declared>Foundation/NSFileHandle.h</declared> <desc> A set of convenience methods for utilizing the socket communications capabilities of the <ref type="class" id="NSFileHandle">NSFileHandle</ref> class. </desc> <method type="id" factory="yes" ovadd="0.0.0" ovrem="0.0.0"> <sel>fileHandleAsClientAtAddress:</sel> <arg type="NSString*">address</arg> <sel>service:</sel> <arg type="NSString*">service</arg> <sel>protocol:</sel> <arg type="NSString*">protocol</arg> <desc> Opens an outgoing network connection by initiating an asynchronous connection (see <ref type="method" id="+fileHandleAsClientInBackgroundAtAddress:service:protocol:forModes:">+fileHandleAsClientInBackgroundAtAddress:service:protocol:forModes:</ref>) and waiting for it to succeed, fail, or time out. </desc> </method> <method type="id" factory="yes" ovadd="0.0.0" ovrem="0.0.0"> <sel>fileHandleAsClientInBackgroundAtAddress:</sel> <arg type="NSString*">address</arg> <sel>service:</sel> <arg type="NSString*">service</arg> <sel>protocol:</sel> <arg type="NSString*">protocol</arg> <desc> Opens an outgoing network connection asynchronously using <ref type="method" id="+fileHandleAsClientInBackgroundAtAddress:service:protocol:forModes:">[+fileHandleAsClientInBackgroundAtAddress:service:protocol:forModes:]</ref> </desc> </method> <method type="id" factory="yes" ovadd="0.0.0" ovrem="0.0.0"> <sel>fileHandleAsClientInBackgroundAtAddress:</sel> <arg type="NSString*">address</arg> <sel>service:</sel> <arg type="NSString*">service</arg> <sel>protocol:</sel> <arg type="NSString*">protocol</arg> <sel>forModes:</sel> <arg type="NSArray*">modes</arg> <desc> <p> Opens an outgoing network connection asynchronously. </p> <list> <item> The <var>address</var> is the name (or IP dotted quad) of the machine to which the connection should be made. </item> <item> The <var>service</var> is the name (or number) of the port to which the connection should be made. </item> <item> The <var>protocol</var> is provided so support different network protocols, but at present only 'tcp' is supported. However, a <var>protocol</var> specification of the form 'socks-...' can be used to control socks5 support. <br /> If '...' is empty (ie the string is just 'socks-' then the connection is <em>not</em> made via a socks server. <br /> Otherwise, the text '...' must be the name of the host on which the socks5 server is running, with an optional port number separated from the host name by a colon. <br /> Alternatively a prefix of the form 'bind-' followed by an IP <var>address</var> may be used (for non-socks connections) to ensure that the connection is made from the specified <var>address</var>. </item> <item> If <var>modes</var> is <code>nil</code> or empty, uses NSDefaultRunLoopMode. </item> </list> <p> This method supports connection through a firewall via socks5. The socks5 connection may be controlled via the <var>protocol</var> argument, but if no socks information is supplied here, the <em>GSSOCKS</em> user default will be used, and failing that, the <em>SOCKS5_SERVER</em> or <em>SOCKS_SERVER</em> environment variables will be used to set the socks server. If none of these mechanisms specify a socks server, the connection will be made directly rather than through socks. </p> </desc> </method> <method type="id" factory="yes" ovadd="0.0.0" ovrem="0.0.0"> <sel>fileHandleAsServerAtAddress:</sel> <arg type="NSString*">address</arg> <sel>service:</sel> <arg type="NSString*">service</arg> <sel>protocol:</sel> <arg type="NSString*">protocol</arg> <desc> Opens a network server socket and listens for incoming connections using the specified <var>service</var> and <var>protocol</var>. <list> <item> The <var>service</var> is the name (or number) of the port to which the connection should be made. </item> <item> The <var>protocol</var> may at present only be 'tcp' </item> </list> </desc> </method> <method type="void" ovadd="0.0.0" ovrem="0.0.0"> <sel>readDataInBackgroundAndNotifyLength:</sel> <arg type="unsigned">len</arg> <desc> Call <ref type="method" id="-readDataInBackgroundAndNotifyLength:forModes:">-readDataInBackgroundAndNotifyLength:forModes:</ref> with <code>nil</code> modes. </desc> </method> <method type="void" ovadd="0.0.0" ovrem="0.0.0"> <sel>readDataInBackgroundAndNotifyLength:</sel> <arg type="unsigned">len</arg> <sel>forModes:</sel> <arg type="NSArray*">modes</arg> <desc> Set up an asynchronous read operation which will cause a notification to be sent when the specified amount of data (or end of file) is read. </desc> </method> <method type="BOOL" ovadd="0.0.0" ovrem="0.0.0"> <sel>readInProgress</sel> <desc> Returns a boolean to indicate whether a read operation of any kind is in progress on the handle. </desc> </method> <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0"> <sel>socketAddress</sel> <desc> Returns the host address of the network connection represented by the file handle. If this handle is an incoming connection which was received by a local server handle, this is the name or address of the client machine. </desc> </method> <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0"> <sel>socketLocalAddress</sel> <desc> Returns the local address of the network connection or <code>nil</code>. </desc> </method> <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0"> <sel>socketLocalService</sel> <desc> Returns the local service/port of the network connection or <code>nil</code>. </desc> </method> <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0"> <sel>socketProtocol</sel> <desc> Returns the name of the protocol in use for the network connection represented by the file handle. </desc> </method> <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0"> <sel>socketService</sel> <desc> Returns the name (or number) of the service (network port) in use for the network connection represented by the file handle. </desc> </method> <method type="BOOL" ovadd="0.0.0" ovrem="0.0.0"> <sel>useCompression</sel> <desc> <p> Return a flag to indicate whether compression has been turned on for the file handle... this is only available on systems where GNUstep was built with 'zlib' support for compressing/decompressing data. </p> <p> On systems which support it, this method may be called after a file handle has been initialised to turn on compression or decompression of the data being written/read. </p> Returns <code>YES</code> on success, <code>NO</code> on failure. <br /> Reasons for failure are - <br /> <list> <item>Not supported/built in to GNUstep</item> <item>File handle has been closed</item> <item> File handle is open for both read and write </item> <item> Failure in compression/decompression library </item> </list> </desc> </method> <method type="void" ovadd="0.0.0" ovrem="0.0.0"> <sel>writeInBackgroundAndNotify:</sel> <arg type="NSData*">item</arg> <desc> Call <ref type="method" id="-writeInBackgroundAndNotify:forModes:">-writeInBackgroundAndNotify:forModes:</ref> with <code>nil</code> modes. </desc> </method> <method type="void" ovadd="0.0.0" ovrem="0.0.0"> <sel>writeInBackgroundAndNotify:</sel> <arg type="NSData*">item</arg> <sel>forModes:</sel> <arg type="NSArray*">modes</arg> <desc> Write the specified data asynchronously, and notify on completion. </desc> </method> <method type="BOOL" ovadd="0.0.0" ovrem="0.0.0"> <sel>writeInProgress</sel> <desc> Returns a boolean to indicate whether a write operation of any kind is in progress on the handle. An outgoing network connection attempt (as a client) is considered to be a write operation. </desc> </method> </category> </chapter> <chapter> <heading> Software documentation for the NSFileHandle(GNUstepTLS) category </heading> <category name="GNUstepTLS" class="NSFileHandle" ovadd="0.0.0" ovrem="0.0.0"> <declared>Foundation/NSFileHandle.h</declared> <desc> Where OpenSSL is available, you can use the subclass returned by <ref type="method" id="+sslClass"> +sslClass </ref> to handle SSL connections. <br /> The <ref type="method" id="-sslAccept"> -sslAccept </ref> method is used to do SSL handshake and start an encrypted session on a channel where the connection was initiated from the far end. <br /> The <ref type="method" id="-sslConnect"> -sslConnect </ref> method is used to do SSL handshake and start an encrypted session on a channel where the connection was initiated from the near end. <br /> The <ref type="method" id="-sslDisconnect"> -sslDisconnect </ref> method is used to end the encrypted session. The <ref type="method" id="-sslSetCertificate:privateKey:PEMpasswd:">-sslSetCertificate:privateKey:PEMpasswd:</ref> method is used to establish a client certificate before starting an encrypted session. <br /> NB. Some of these methods may block while performing I/O on the network connection, (though they should run the current runloop while doing so) so you should structure your code to handle that. In particular, if you are writing a server application, you should initiate a background accept to allow another incoming connection <em>before</em> you perform an <ref type="method" id="-sslAccept">-sslAccept</ref> on a connection you have just accepted. </desc> <method type="void" factory="yes" ovadd="0.0.0" ovrem="0.0.0"> <sel>setData:</sel> <arg type="NSData*">data</arg> <sel>forTLSFile:</sel> <arg type="NSString*">fileName</arg> <desc> Sets the known (cached) <var>data</var> content for the specified file name. <br /> Calling this with a <code>nil</code> <var>data</var> object will remove any existing value from the cache. <br /> You may use this method to control what <var>data</var> is used for specified file names when those file names are used as a result of SSL/TLS options being set for a file handle or stream. </desc> </method> <method type="Class" factory="yes" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslClass</sel> <desc> Returns the class to handle ssl enabled connections. <br /> returns the concrete class used to implement SSL/TLS connections. </desc> </method> <method type="BOOL" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslAccept</sel> <desc> Repeatedly attempt an incoming handshake for up to 30 seconds or until the handshake completes. </desc> </method> <method type="BOOL" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslConnect</sel> <desc> Repeatedly attempt an outgoing handshake for up to 30 seconds or until the handshake completes. </desc> </method> <method type="void" override="dummy" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslDisconnect</sel> <desc> Shuts down the SSL connection to the system that the handle is talking to. </desc> </method> <method type="BOOL" override="dummy" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslHandshakeEstablished:</sel> <arg type="BOOL*">result</arg> <sel>outgoing:</sel> <arg type="BOOL">isOutgoing</arg> <desc> Make a non-blocking handshake attempt. Calls to this method should be repeated until the method returns <code>YES</code> indicating that the handshake completed. If the method returns <code>YES</code> indicating completion of the handshake, the <var>result</var> indicates whether the handshake succeeded in establishing a connection or not. <br /> The default implementation simply returns <code>YES</code> and sets <var>result</var> to <code>NO</code>. <br /> This is implemented by an SSL handling subclass to perform real work. </desc> </method> <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslIssuer</sel> <desc> If the session verified a certificate from the remote end, returns the name of the certificate issuer in the form "C=xxxx,O=yyyy,CN=zzzz" as described in RFC2253. Otherwise returns <code>nil</code>. </desc> </method> <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslOwner</sel> <desc> If the session verified a certificate from the remote end, returns the name of the certificate owner in the form "C=xxxx,O=yyyy,CN=zzzz" as described in RFC2253. Otherwise returns <code>nil</code>. </desc> </method> <method type="void" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslSetCertificate:</sel> <arg type="NSString*">certFile</arg> <sel>privateKey:</sel> <arg type="NSString*">privateKey</arg> <sel>PEMpasswd:</sel> <arg type="NSString*">PEMpasswd</arg> <desc> Deprecated... use <ref type="method" id="-sslSetOptions:"> -sslSetOptions: </ref> instead </desc> </method> <method type="NSString*" override="dummy" ovadd="0.0.0" ovrem="0.0.0"> <sel>sslSetOptions:</sel> <arg type="NSDictionary*">options</arg> <desc> Sets <var>options</var> to be used to configure this channel before the handshake. <br /> Returns <code>nil</code> on success, or an error message if some <var>options</var> could not be set. <br /> You may use the same <var>options</var> as property settings with the GNUstep implementation of NSStream. <br /> Expects key value pairs with the following names/meanings: <deflist> <term>GSTLSCAFile</term> <desc> A string identifying the full path to the file containing any trusted certificate authorities to be used when verifying a certificate presented by the remote end of a connection. </desc> <term>GSTLSCertificateFile</term> <desc> The path to a PEM encoded certificate used to identify this end of the connection. This option <em>must</em> be set for handing an incoming connection, but is optional for outgoing connections. <br /> This must be used in conjunction with GSTLSCertificateKeyFile. </desc> <term>GSTLSCertificateKeyFile</term> <desc> The path to a PEM encoded key used to unlock the certificate file for the connection. The key in the file may or may not be encrypted, but if it is encrypted you must specify GSTLSCertificateKeyPassword. </desc> <term>GSTLSCertificateKeyPassword</term> <desc> A string to be used as the password to decrypt a key which was specified using GSTLSKeyPassword. </desc> <term>GSTLSDebug</term> <desc> A boolean specifying whether diagnostic debug is to be enabled to log information about a connection where the handshake fails. <br /> </desc> <term>GSTLSPriority</term> <desc> A GNUTLS priority string describing the ciphers etc which may be used for the connection. In addition the string may be one of SSLv3, or TLSv1 to use the appropriate general settings for negotiating a connection of the specified type. </desc> <term>GSTLSRemoteHosts</term> <desc> A comma delimited list of host names to be allowed when verifying the certificate of the host we are connecting to. <br /> If this is not specified, all the names provided by NSHost are used. </desc> <term>GSTLSRevokeFile</term> <desc> The full path of a file containing certificate revocation information for certificates issued by our trusted authorites but no longer valid. </desc> <term>GSTLSServerName</term> <desc> By default the TLS layer when making an HTTPS request sets the 'Server Name Indication' (SNI) to be the name of the host in the URL that is being fetched. <br /> This option allows the SNI to be set for other connections and permits overriding of the default behavior for HTTPS requests. Setting the value of GSTLSServerName to an empty string will prevent the SNI from being sent in the TLS handshake (this is sometimes desirable to prevent information leakage; the SNI information is sent unencrypted). <br /> Some web servers require SNI in order to tell what hostname an HTTPS request is for and decide which certificate to present to the client. </desc> <term>GSTLSVerify</term> <desc> A boolean specifying whether we should require the remote end to supply a valid certificate in order to establish an encrypted connection. </desc> </deflist> </desc> </method> </category> </chapter> </body> </gsdoc>