hkdf: when HMAC key is all zeros, still set a valid key length
[openssl.git] / ssl / pqueue.c
index 29804ec0274db8d8626cc1eb427d7e8ad2bb1712..db161e25da1fb6c8b89bfeeb3fbf03fcf4e17765 100644 (file)
@@ -1,13 +1,13 @@
 /*
- * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2005-2020 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
 
-#include "ssl_locl.h"
+#include "ssl_local.h"
 #include <openssl/bn.h>
 
 struct pqueue_st {
@@ -19,10 +19,8 @@ pitem *pitem_new(unsigned char *prio64be, void *data)
 {
     pitem *item = OPENSSL_malloc(sizeof(*item));
 
-    if (item == NULL) {
-        SSLerr(SSL_F_PITEM_NEW, ERR_R_MALLOC_FAILURE);
+    if (item == NULL)
         return NULL;
-    }
 
     memcpy(item->priority, prio64be, sizeof(item->priority));
     item->data = data;
@@ -35,13 +33,10 @@ void pitem_free(pitem *item)
     OPENSSL_free(item);
 }
 
-pqueue *pqueue_new()
+pqueue *pqueue_new(void)
 {
     pqueue *pq = OPENSSL_zalloc(sizeof(*pq));
 
-    if (pq == NULL)
-        SSLerr(SSL_F_PQUEUE_NEW, ERR_R_MALLOC_FAILURE);
-
     return pq;
 }