Skip to content

Commit

Permalink
Changes for libimobiledevice 860ffb
Browse files Browse the repository at this point in the history
  • Loading branch information
julek-wolfssl committed Jan 24, 2025
1 parent f1e06e1 commit 0144097
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 204 deletions.
24 changes: 22 additions & 2 deletions src/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ int wolfSSL_BIO_read(WOLFSSL_BIO* bio, void* buf, int len)
#endif
break;

case WOLFSSL_BIO_NULL:
ret = 0;
break;

} /* switch */
}

Expand Down Expand Up @@ -813,6 +817,10 @@ int wolfSSL_BIO_write(WOLFSSL_BIO* bio, const void* data, int len)
#endif
break;

case WOLFSSL_BIO_NULL:
ret = len;
break;

} /* switch */
}

Expand Down Expand Up @@ -1161,6 +1169,10 @@ int wolfSSL_BIO_gets(WOLFSSL_BIO* bio, char* buf, int sz)
break;
#endif /* WOLFCRYPT_ONLY */

case WOLFSSL_BIO_NULL:
ret = 0;
break;

default:
WOLFSSL_MSG("BIO type not supported yet with wolfSSL_BIO_gets");
}
Expand Down Expand Up @@ -1908,7 +1920,7 @@ long wolfSSL_BIO_set_mem_eof_return(WOLFSSL_BIO *bio, int v)

int wolfSSL_BIO_get_len(WOLFSSL_BIO *bio)
{
int len;
int len = 0;
#ifndef NO_FILESYSTEM
long memSz = 0;
XFILE file;
Expand Down Expand Up @@ -2309,6 +2321,15 @@ int wolfSSL_BIO_flush(WOLFSSL_BIO* bio)
return &meth;
}

WOLFSSL_BIO_METHOD *wolfSSL_BIO_s_null(void)
{
static WOLFSSL_BIO_METHOD meth =
WOLFSSL_BIO_METHOD_INIT(WOLFSSL_BIO_NULL);

WOLFSSL_ENTER("wolfSSL_BIO_s_null");

return &meth;
}

WOLFSSL_BIO_METHOD *wolfSSL_BIO_s_socket(void)
{
Expand Down Expand Up @@ -2353,7 +2374,6 @@ int wolfSSL_BIO_flush(WOLFSSL_BIO* bio)

WOLFSSL_ENTER("wolfSSL_BIO_new_dgram");
if (bio) {
bio->type = WOLFSSL_BIO_DGRAM;
bio->shutdown = (byte)closeF;
bio->num.fd = (SOCKET_T)fd;
}
Expand Down
Loading

0 comments on commit 0144097

Please sign in to comment.