diff options
author | 2014-05-12 19:14:14 +0000 | |
---|---|---|
committer | 2014-05-12 19:14:14 +0000 | |
commit | 4c60c45e934fe98c717601eab1e70d0dddf0989b (patch) | |
tree | e4c7aa0f2a72eecb831efde321923bb912020b62 /lib/libssl/src | |
parent | no md5crypt (diff) | |
download | wireguard-openbsd-4c60c45e934fe98c717601eab1e70d0dddf0989b.tar.xz wireguard-openbsd-4c60c45e934fe98c717601eab1e70d0dddf0989b.zip |
Move the `pqueue' part of libcrypto, which is a glorified sorted linked list
of 64-bit data, and only used by DTLS, to libssl where it belongs.
Remove pqueue_print() which is a debugging interface and serves no useful
purpose, except for the regress test, which grows its own pqueue_print()
routine.
Bump libcrypto major and libssl minor.
WARNING: do not update your tree right now, more changes are coming, which
will ride the libcrypto major bump.
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/ssl/pqueue.c (renamed from lib/libssl/src/crypto/pqueue/pqueue.c) | 21 | ||||
-rw-r--r-- | lib/libssl/src/ssl/pqueue.h (renamed from lib/libssl/src/crypto/pqueue/pqueue.h) | 1 |
2 files changed, 3 insertions, 19 deletions
diff --git a/lib/libssl/src/crypto/pqueue/pqueue.c b/lib/libssl/src/ssl/pqueue.c index fc68ae19c3d..99c118c3b6f 100644 --- a/lib/libssl/src/crypto/pqueue/pqueue.c +++ b/lib/libssl/src/ssl/pqueue.c @@ -57,8 +57,7 @@ * */ -#include "cryptlib.h" -#include <openssl/bn.h> +#include <string.h> #include "pqueue.h" typedef struct _pqueue { @@ -175,7 +174,8 @@ pqueue_find(pqueue_s *pq, unsigned char *prio64be) return NULL; for (next = pq->items; next != NULL; next = next->next) { - if (memcmp(next->priority, prio64be, 8) == 0) { + if (memcmp(next->priority, prio64be, + sizeof(next->priority)) == 0) { found = next; break; } @@ -187,21 +187,6 @@ pqueue_find(pqueue_s *pq, unsigned char *prio64be) return found; } -void -pqueue_print(pqueue_s *pq) -{ - pitem *item = pq->items; - - while (item != NULL) { - printf("item\t%02x%02x%02x%02x%02x%02x%02x%02x\n", - item->priority[0], item->priority[1], - item->priority[2], item->priority[3], - item->priority[4], item->priority[5], - item->priority[6], item->priority[7]); - item = item->next; - } -} - pitem * pqueue_iterator(pqueue_s *pq) { diff --git a/lib/libssl/src/crypto/pqueue/pqueue.h b/lib/libssl/src/ssl/pqueue.h index 729e9abaf25..6e7df8f35b7 100644 --- a/lib/libssl/src/crypto/pqueue/pqueue.h +++ b/lib/libssl/src/ssl/pqueue.h @@ -87,7 +87,6 @@ pitem *pqueue_find(pqueue pq, unsigned char *prio64be); pitem *pqueue_iterator(pqueue pq); pitem *pqueue_next(piterator *iter); -void pqueue_print(pqueue pq); int pqueue_size(pqueue pq); #endif /* ! HEADER_PQUEUE_H */ |