Skip to content

Commit

Permalink
Moved wolfSSL_AsyncPoll and wolfSSL_CTX_AsyncPoll into ssl layer.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Jul 25, 2016
1 parent b018217 commit 9da325a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
29 changes: 0 additions & 29 deletions wolfcrypt/src/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,35 +279,6 @@ int wolfAsync_EventPoll(WOLF_EVENT* event, WOLF_EVENT_FLAG flags)
return ret;
}

int wolfSSL_CTX_AsyncPoll(WOLFSSL_CTX* ctx, WOLF_EVENT** events, int maxEvents,
WOLF_EVENT_FLAG flags, int* eventCount)
{
if (ctx == NULL) {
return BAD_FUNC_ARG;
}

return wolfAsync_EventQueuePoll(&ctx->event_queue, NULL,
events, maxEvents, flags, eventCount);
}

int wolfSSL_AsyncPoll(WOLFSSL* ssl, WOLF_EVENT_FLAG flags)
{
int ret, eventCount = 0;
WOLF_EVENT* events[1];

if (ssl == NULL) {
return BAD_FUNC_ARG;
}

/* not filtering on "ssl", since its the asyncDev */
ret = wolfAsync_EventQueuePoll(&ssl->ctx->event_queue, NULL,
events, sizeof(events)/sizeof(WOLF_EVENT), flags, &eventCount);
if (ret == 0 && eventCount > 0) {
ret = 1; /* Success */
}

return ret;
}

#ifdef HAVE_CAVIUM
static int wolfAsync_CheckMultiReqBuf(AsyncCryptDev* asyncDev,
Expand Down
5 changes: 0 additions & 5 deletions wolfssl/wolfcrypt/async.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h>
#endif

struct WOLFSSL;

#ifndef WOLFCRYPT_ONLY
/* this strucutre is used for caching TLS state on WC_PENDING_E */
Expand Down Expand Up @@ -226,10 +225,6 @@ WOLFSSL_API int wolfAsync_EventQueuePush(WOLF_EVENT_QUEUE* queue, WOLF_EVENT* ev
WOLFSSL_API int wolfAsync_EventQueuePoll(WOLF_EVENT_QUEUE* queue, void* context_filter,
WOLF_EVENT** events, int maxEvents, WOLF_EVENT_FLAG flags, int* eventCount);

WOLFSSL_API int wolfSSL_AsyncPoll(struct WOLFSSL* ssl, WOLF_EVENT_FLAG flags);
WOLFSSL_API int wolfSSL_CTX_AsyncPoll(WOLFSSL_CTX* ctx, WOLF_EVENT** events, int maxEvents,
WOLF_EVENT_FLAG flags, int* eventCount);

#endif /* WOLFSSL_ASYNC_CRYPT */

#ifdef __cplusplus
Expand Down

0 comments on commit 9da325a

Please sign in to comment.