Added DRBG_HMAC & DRBG_HASH + Added defaults for setting DRBG for master/public/priva...
[openssl.git] / doc / man3 / SSL_CTX_set_tlsext_ticket_key_cb.pod
index 5c11089acd35e6b18c5addb375b8a74f92d14a0e..9b448db664e176668f9ebdc712fe6a245d5813b1 100644 (file)
@@ -9,9 +9,9 @@ SSL_CTX_set_tlsext_ticket_key_cb - set a callback for session ticket processing
  #include <openssl/tls1.h>
 
  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));
+     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));
 
 =head1 DESCRIPTION
 
@@ -133,7 +133,7 @@ Reference Implementation:
                                      HMAC_CTX *hctx, int enc)
  {
      if (enc) { /* create new session */
-         if (RAND_bytes(iv, EVP_MAX_IV_LENGTH))
+         if (RAND_bytes(iv, EVP_MAX_IV_LENGTH) <= 0)
              return -1; /* insufficient random */
 
          key = currentkey(); /* something that you need to implement */
@@ -190,7 +190,7 @@ L<SSL_CTX_set_session_id_context(3)>,
 
 =head1 COPYRIGHT
 
-Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved.
 
 Licensed under the OpenSSL license (the "License").  You may not use
 this file except in compliance with the License.  You can obtain a copy