SSL_CTX_set_tlsext_ticket_key_cb.pod: fix error check of RAND_bytes() call
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Tue, 17 Apr 2018 06:54:26 +0000 (08:54 +0200)
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Tue, 17 Apr 2018 15:31:09 +0000 (17:31 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5977)

doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod

index 3cf0717..7782ea7 100644 (file)
@@ -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 */