diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-08-19 15:13:00 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-08-22 04:50:39 +0900 |
commit | 2a1e30ed611a8d4f1d5bea2c460c17404a3b9a10 (patch) | |
tree | f78925b841ad3b0325678644b352ace727430016 /ext/openssl/ossl_ssl_session.c | |
parent | a335e3f626ffed0d7e1cbb0c9104339364ed1791 (diff) | |
download | ruby-openssl-2a1e30ed611a8d4f1d5bea2c460c17404a3b9a10.tar.gz |
ssl: fixup documentation
Diffstat (limited to 'ext/openssl/ossl_ssl_session.c')
-rw-r--r-- | ext/openssl/ossl_ssl_session.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/ext/openssl/ossl_ssl_session.c b/ext/openssl/ossl_ssl_session.c index 6ff670d5..fb7c0fb6 100644 --- a/ext/openssl/ossl_ssl_session.c +++ b/ext/openssl/ossl_ssl_session.c @@ -28,12 +28,12 @@ static VALUE ossl_ssl_session_alloc(VALUE klass) /* * call-seq: - * Session.new(SSLSocket | string) => session + * Session.new(ssl_socket) -> Session + * Session.new(string) -> Session * - * === Parameters - * +SSLSocket+ is an OpenSSL::SSL::SSLSocket - * +string+ must be a DER or PEM encoded Session. -*/ + * Creates a new Session object from an instance of SSLSocket or DER/PEM encoded + * String. + */ static VALUE ossl_ssl_session_initialize(VALUE self, VALUE arg1) { SSL_SESSION *ctx = NULL; @@ -118,9 +118,10 @@ int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b) /* * call-seq: - * session1 == session2 -> boolean + * session1 == session2 -> boolean * -*/ + * Returns true if the two Session is the same, false if not. + */ static VALUE ossl_ssl_session_eq(VALUE val1, VALUE val2) { SSL_SESSION *ctx1, *ctx2; @@ -138,9 +139,8 @@ static VALUE ossl_ssl_session_eq(VALUE val1, VALUE val2) * call-seq: * session.time -> Time * - * Gets start time of the session. - * -*/ + * Returns the time at which the session was established. + */ static VALUE ossl_ssl_session_get_time(VALUE self) { SSL_SESSION *ctx; @@ -158,11 +158,12 @@ static VALUE ossl_ssl_session_get_time(VALUE self) /* * call-seq: - * session.timeout -> integer + * session.timeout -> Integer * - * Gets how long until the session expires in seconds. + * Returns the timeout value set for the session, in seconds from the + * established time. * -*/ + */ static VALUE ossl_ssl_session_get_timeout(VALUE self) { SSL_SESSION *ctx; @@ -177,12 +178,12 @@ static VALUE ossl_ssl_session_get_timeout(VALUE self) /* * call-seq: - * session.time=(Time) -> Time - * session.time=(integer) -> Time + * session.time = time + * session.time = integer * * Sets start time of the session. Time resolution is in seconds. * -*/ + */ static VALUE ossl_ssl_session_set_time(VALUE self, VALUE time_v) { SSL_SESSION *ctx; @@ -199,11 +200,10 @@ static VALUE ossl_ssl_session_set_time(VALUE self, VALUE time_v) /* * call-seq: - * session.timeout=(integer) -> integer + * session.timeout = integer * * Sets how long until the session expires in seconds. - * -*/ + */ static VALUE ossl_ssl_session_set_timeout(VALUE self, VALUE time_v) { SSL_SESSION *ctx; @@ -217,7 +217,7 @@ static VALUE ossl_ssl_session_set_timeout(VALUE self, VALUE time_v) /* * call-seq: - * session.id -> aString + * session.id -> String * * Returns the Session ID. */ @@ -236,10 +236,10 @@ static VALUE ossl_ssl_session_get_id(VALUE self) /* * call-seq: - * session.to_der -> aString + * session.to_der -> String * * Returns an ASN1 encoded String that contains the Session object. -*/ + */ static VALUE ossl_ssl_session_to_der(VALUE self) { SSL_SESSION *ctx; @@ -265,7 +265,7 @@ static VALUE ossl_ssl_session_to_der(VALUE self) * session.to_pem -> String * * Returns a PEM encoded String that contains the Session object. -*/ + */ static VALUE ossl_ssl_session_to_pem(VALUE self) { SSL_SESSION *ctx; @@ -297,8 +297,8 @@ static VALUE ossl_ssl_session_to_pem(VALUE self) * call-seq: * session.to_text -> String * - * Shows everything in the Session object. -*/ + * Shows everything in the Session object. This is for diagnostic purposes. + */ static VALUE ossl_ssl_session_to_text(VALUE self) { SSL_SESSION *ctx; |