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 3cf0717d2a1b649ea72a5e3fcf9041375f7677ab..7782ea7d258849e45564f90c83338807f245cbaf 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 */