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

Saving the serialized context to a file #3194

Merged
merged 2 commits into from
Apr 20, 2020

Conversation

piotr-now
Copy link
Contributor

Signed-off-by: Piotr Nowicki [email protected]

Description

This PR adds in the ssl_server2 and ssl_client2 programs the ability to save a serialized context to a file as base64 code.

Status

READY

Requires Backporting

NO

@@ -516,6 +523,9 @@ struct options
* during renegotiation */
const char *cid_val; /* the CID to use for incoming messages */
int serialize; /* serialize/deserialize connection */
const char *serial_to_file; /* the file to write a serialized connection
* in the form of base64 code ( serialize
Copy link
Contributor

Choose a reason for hiding this comment

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

Style: don't need spaces after ( in comments.

" serialize=%%d default: 0 (do not serialize/deserialize)\n" \
" options: 1 (serialize)\n" \
" 2 (serialize with re-initialization)\n" \
" serial_to_file=%%s The file path to write a serialized connection\n"\
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we rename this to "context_file"? "Serial to file" doesn't make very much sense in English.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I know. I wanted to use an abbreviation instead of a full word like for example 'renego' instead of 'renegotiation' :). I changed to 'context_file'

programs/ssl/ssl_client2.c Show resolved Hide resolved
Signed-off-by: Piotr Nowicki <[email protected]>
@piotr-now piotr-now force-pushed the serialized_to_file branch from 20b35ed to 8ea0f48 Compare April 17, 2020 12:48
@piotr-now
Copy link
Contributor Author

Added missing mbedtls_free to fix CI failure

@piotr-now piotr-now requested a review from Patater April 17, 2020 13:01
Patater
Patater previously approved these changes Apr 17, 2020
Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM, other than cleanup() function.

tests/ssl-opt.sh Show resolved Hide resolved
@piotr-now piotr-now force-pushed the serialized_to_file branch from 8ea0f48 to 3de298f Compare April 17, 2020 14:27
@piotr-now piotr-now requested a review from Patater April 17, 2020 14:35
@danh-arm danh-arm added enhancement needs-review Every commit must be reviewed by at least two team members, labels Apr 20, 2020
@Patater Patater removed the needs-review Every commit must be reviewed by at least two team members, label Apr 20, 2020
@Patater
Copy link
Contributor

Patater commented Apr 20, 2020

CI passing, other than Mbed OS known issue which is being addressed separately. Good to go.

@Patater Patater merged commit 3a7ca1d into Mbed-TLS:development Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants