Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240418-exosip-apis #7648

Merged
merged 21 commits into from
Jul 17, 2024
Merged

20240418-exosip-apis #7648

merged 21 commits into from
Jul 17, 2024

Conversation

douzzer
Copy link
Contributor

@douzzer douzzer commented Jun 15, 2024

new and updated APIs to support eXosip2

@douzzer douzzer self-assigned this Jun 15, 2024
@douzzer
Copy link
Contributor Author

douzzer commented Jun 15, 2024

retest this please

Copy link
Member

@julek-wolfssl julek-wolfssl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work. Please run exosip under a sanitizer or valgrind to check for any memory leaks due to differences in OpenSSL vs. wolfSSL.

wolfssl/wolfio.h Outdated Show resolved Hide resolved
@@ -537,38 +538,6 @@ struct WOLFSSL_BIO_METHOD {
typedef long (*wolf_bio_info_cb)(WOLFSSL_BIO *bio, int event, const char *parg,
int iarg, long larg, long return_value);

struct WOLFSSL_BIO {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving this struct outside of ssl.h can break cases where BIO is declared on the stack. Overall hiding this is a good move but let's just keep that in mind and see if the OSP's pass.

Copy link
Contributor Author

@douzzer douzzer Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that was my thinking too -- there's state in it that we would definitely prefer to hide, and I thought I'd take a shot at opaqueing it and see what happens.

wolfssl/ssl.h Outdated Show resolved Hide resolved
src/x509.c Outdated Show resolved Hide resolved
wolfssl/internal.h Outdated Show resolved Hide resolved
tests/api.c Outdated Show resolved Hide resolved
tests/api.c Outdated Show resolved Hide resolved
tests/api.c Outdated Show resolved Hide resolved
src/bio.c Outdated Show resolved Hide resolved
tests/api.c Outdated Show resolved Hide resolved
@douzzer
Copy link
Contributor Author

douzzer commented Jun 22, 2024

Please run exosip under a sanitizer or valgrind to check for any memory leaks due to differences in OpenSSL vs. wolfSSL.

"All heap blocks were freed -- no leaks are possible" -- good start! But that was just for ./tools/.libs/sip_monitor, which doesn't properly exercise libeXosip2.

We'll know more once we have the target application(s) to test it on.

@douzzer douzzer force-pushed the 20240418-exosip-apis branch 3 times, most recently from ac899ea to b981ff2 Compare June 25, 2024 04:36
@douzzer
Copy link
Contributor Author

douzzer commented Jun 25, 2024

retest this please

@douzzer douzzer marked this pull request as ready for review June 25, 2024 05:24
wolfssl/internal.h Show resolved Hide resolved
wolfssl/error-ssl.h Outdated Show resolved Hide resolved
wolfssl/wolfcrypt/asn.h Show resolved Hide resolved
src/wolfio.c Outdated Show resolved Hide resolved
src/ssl_load.c Outdated Show resolved Hide resolved
tests/api.c Outdated Show resolved Hide resolved
tests/api.c Outdated Show resolved Hide resolved
src/bio.c Outdated Show resolved Hide resolved
@douzzer
Copy link
Contributor Author

douzzer commented Jun 26, 2024

retest this please

src/wolfio.c Outdated Show resolved Hide resolved
src/wolfio.c Outdated Show resolved Hide resolved
src/wolfio.c Outdated Show resolved Hide resolved
src/wolfio.c Outdated Show resolved Hide resolved
@douzzer
Copy link
Contributor Author

douzzer commented Jun 29, 2024

retest this please

@douzzer
Copy link
Contributor Author

douzzer commented Jun 29, 2024

retest this please

julek-wolfssl
julek-wolfssl previously approved these changes Jul 5, 2024
src/bio.c Outdated Show resolved Hide resolved
src/bio.c Outdated Show resolved Hide resolved
src/ssl.c Outdated Show resolved Hide resolved
src/wolfio.c Outdated Show resolved Hide resolved
wolfssl/wolfcrypt/asn.h Show resolved Hide resolved
@SparkiDev SparkiDev assigned douzzer and unassigned SparkiDev Jul 15, 2024
…ent_compression(), and wolfSSL_get_current_expansion(), and add compat layer shim macros for them.
…SSL_BIO_number_written, and compat layer shim macros SSL_set0_rbio, SSL_set0_wbio, BIO_number_read, BIO_number_written, BIO_reset.
…lfSSL_X509_STORE_get0_param, and make wolfSSL_X509_VERIFY_PARAM_inherit a public API; add macros to openssl compat layer: DTLS_client_method, DTLS_server_method, X509_VERIFY_PARAM_lookup, X509_VERIFY_PARAM_inherit, X509_STORE_get0_param; add "const char *name" slot to struct WOLFSSL_X509_VERIFY_PARAM to support wolfSSL_X509_VERIFY_PARAM_lookup.
…WOLFSSL_BIO_DGRAM, and remove now-duplicate prototype and definition of wolfSSL_X509_STORE_get0_param.
…NECTED, BIO_CTRL_DGRAM_SET_PEER, WOLFSSL_MULTI_LABEL_WILDCARDS, WOLFSSL_MULTI_LABEL_WILDCARDS, NID_id_GostR3410_2001, NID_id_GostR3410_2012_256, NID_id_GostR3410_2012_512; fix flag arithmetic in wolfSSL_X509_check_host(); add compat macros for i2d_X509_PUBKEY, BIO_new_dgram.
…_ADDR_free(), wolfSSL_BIO_ADDR_clear(), wolfIO_SendTo(), wolfIO_RecvFrom(); fix name of wolfSSL_BIO_s_datagram().
…PECT_SUCCESS() to tolerate TEST_SKIPPED; add WIP test_wolfSSL_BIO_datagram.
…VE_BIO_ADDR gates to also gate on WOLFSSL_DTLS and OPENSSL_EXTRA; use DTLS_RECVFROM_FUNCTION, DTLS_SENDTO_FUNCTION, SOCKET_T, SOCKADDR, SOCKADDR_IN, and SOCKADDR_IN6 macros and types, and add SOCKADDR_UN type.
refactor housekeeping for bio->bytes_read and bio->bytes_write, and add WOLFSSL_BIO_HAVE_FLOW_STATS gate;

add WOLFSSL_BIO_FLAG_RETRY housekeeping for WOLFSSL_BIO_SOCKET and WOLFSSL_BIO_DGRAM;

refactor WOLFSSL_BIO.peer_addr to be inline rather than a pointer;

add wolfSSL_set_mtu_compat() and wolfSSL_CTX_load_verify_locations_compat() implementations;

enable WOLFSSL_HAVE_BIO_ADDR and WOLFSSL_DTLS_MTU when OPENSSL_ALL.
…wolfSSL_BIO_ctrl() case BIO_CTRL_DGRAM_SET_CONNECTED.
… and wolfSSL_BIO_write() to wolfIO_Recv(), wolfIO_Send(), wolfIO_RecvFrom(), and wolfIO_SendTo(); add SOCKET_ETIMEDOUT definitions to wolfio.h; misc cleanups.
…TranslateIoError() into complete+consistent wolfSSL_LastError() and TranslateIoReturnCode(), handling all special cases correctly, and correctly returning WOLFSSL_CBIO_ERR_WANT_WRITE and WOLFSSL_CBIO_ERR_TIMEOUT. use TranslateIoReturnCode() directly in wolfIO_Recv(), wolfIO_Send(), wolfIO_RecvFrom(), wolfIO_SendTo(), and remove now-superfluous TranslateIoError() calls from EmbedReceive(), EmbedSend(), EmbedReceiveFrom(), EmbedSendTo(), EmbedReceiveFromMcast().
* tweak typography;
* move wolfSSL_i2d_X509_PUBKEY() from ssl.c to x509.c;
* in asn.h, add !NO_ASN_OLD_TYPE_NAMES macros to remap old names (ISSUER, SUBJECT, BEFORE, AFTER) by default unless the macros are already defined.
@douzzer
Copy link
Contributor Author

douzzer commented Jul 17, 2024

retest this please

@SparkiDev SparkiDev merged commit ec9fcf5 into wolfSSL:master Jul 17, 2024
119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants