Update fuzz corpora
[openssl.git] / doc / ssl / SSL_CTX_set_tlsext_ticket_key_cb.pod
index 4ae381861afbe9e002aba6ff1d45d75e4244ef9d..5308cccdd8a88cce9960456094346968afac74b7 100644 (file)
@@ -10,13 +10,13 @@ SSL_CTX_set_tlsext_ticket_key_cb - set a callback for session ticket processing
 
  long SSL_CTX_set_tlsext_ticket_key_cb(SSL_CTX sslctx,
         int (*cb)(SSL *s, unsigned char key_name[16],
-                 unsigned char iv[EVP_MAX_IV_LENGTH],
-                 EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc));
+                  unsigned char iv[EVP_MAX_IV_LENGTH],
+                  EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc));
 
 =head1 DESCRIPTION
 
 SSL_CTX_set_tlsext_ticket_key_cb() sets a callback function I<cb> for handling
-session tickets for the ssl context I<sslctx>. Session tickets, defined in 
+session tickets for the ssl context I<sslctx>. Session tickets, defined in
 RFC5077 provide an enhanced session resumption capability where the server
 implementation is not required to maintain per session state. It only applies
 to TLS and there is no SSLv3 implementation.
@@ -26,9 +26,9 @@ session when session ticket extension is presented in the TLS hello
 message. It is the responsibility of this function to create or retrieve the
 cryptographic parameters and to maintain their state.
 
-The OpenSSL library uses your callback function to help implement a common TLS 
+The OpenSSL library uses your callback function to help implement a common TLS
 ticket construction state according to RFC5077 Section 4 such that per session
-state is unnecessary and a small set of cryptographic variables needs to be 
+state is unnecessary and a small set of cryptographic variables needs to be
 maintained by the callback function implementation.
 
 In order to reuse a session, a TLS client must send the a session ticket
@@ -56,7 +56,7 @@ I<ctx> should use the initialisation vector I<iv>. The cipher context can be
 set using L<EVP_EncryptInit_ex(3)>. The hmac context can be set using
 L<HMAC_Init_ex(3)>.
 
-When the client presents a session ticket, the callback function with be called 
+When the client presents a session ticket, the callback function with be called
 with I<enc> set to 0 indicating that the I<cb> function should retrieve a set
 of parameters. In this case I<name> and I<iv> have already been parsed out of
 the session ticket. The OpenSSL library expects that the I<name> will be used
@@ -76,7 +76,7 @@ further processing will occur. The following return values have meaning:
 
 =item Z<>2
 
-This indicates that the I<ctx> and I<hctx> have been set and the session can 
+This indicates that the I<ctx> and I<hctx> have been set and the session can
 continue on those parameters. Additionally it indicates that the session
 ticket is in a renewal period and should be replaced. The OpenSSL library will
 call I<cb> again with an enc argument of 1 to set the new ticket (see RFC5077
@@ -84,12 +84,12 @@ call I<cb> again with an enc argument of 1 to set the new ticket (see RFC5077
 
 =item Z<>1
 
-This indicates that the I<ctx> and I<hctx> have been set and the session can 
+This indicates that the I<ctx> and I<hctx> have been set and the session can
 continue on those parameters.
 
 =item Z<>0
 
-This indicates that it was not possible to set/retrieve a session ticket and 
+This indicates that it was not possible to set/retrieve a session ticket and
 the SSL/TLS session will continue by negotiating a set of cryptographic
 parameters or using the alternate SSL/TLS resumption mechanism, session ids.
 
@@ -133,7 +133,7 @@ Reference Implementation:
           if (RAND_bytes(iv, EVP_MAX_IV_LENGTH) ) {
               return -1; /* insufficient random */
           }
-  
+
           key = currentkey(); /* something that you need to implement */
           if ( !key ) {
               /* current key doesn't exist or isn't valid */
@@ -146,19 +146,19 @@ Reference Implementation:
               }
           }
           memcpy(key_name, key->name, 16);
-  
+
           EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key->aes_key, iv);
           HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL);
-  
+
           return 1;
-  
+
       } else { /* retrieve session */
           key = findkey(name);
-  
+
           if  (!key || key->expire < now() ) {
               return 0;
           }
-  
+
           HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL);
           EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key->aes_key, iv );
 
@@ -167,7 +167,7 @@ Reference Implementation:
               return 2;
           }
           return 1;
-  
+
       }
   }
 
@@ -186,8 +186,6 @@ L<SSL_CTX_sess_number(3)>,
 L<SSL_CTX_sess_set_get_cb(3)>,
 L<SSL_CTX_set_session_id_context(3)>,
 
-=cut
-
 =head1 COPYRIGHT
 
 Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.