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

Added client-tls-smtp-overssl.c and client-tls-smtp-starttls.c #362

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

yota22721
Copy link

No description provided.

@yota22721 yota22721 changed the title Smtp Added client-tls-smtp-overssl.c and client-tls-smtp-starttls.c Jan 20, 2023
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Please update the tls/README.md with a description and sample usage:

% ./client-tls-smtp-overssl
usage: ./client-tls-smtp-overssl <SERVER_NAME> <CERT_FILE>

% ./client-tls-smtp-starttls
usage: ./client-tls-smtp-starttls <SERVER_NAME> <CERT_FILE>

@@ -82,7 +82,7 @@ int main(int argc, char** argv)
ret = -1;
goto end;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert this whitespace addition.

close(sockfd); /* Close the connection to the server */
end:
return ret; /* Return reporting a success */
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add extra newline to end of file. Should be one at end. Thanks

#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/coding.h>

/*smtp starttls commands */
Copy link
Contributor

Choose a reason for hiding this comment

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

/* smtp

}

/* Encode the mail to Base64 */
word32 outLen = sizeof(buff);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't mix variable declarations in code. Must be top of function or in a brace section.

goto cleanup;
}
/* Get the right mail address length */
for(len=0;len<sizeof(plain);len++){
Copy link
Contributor

Choose a reason for hiding this comment

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

Add spaces for (len=0; len<sizeof(plain); len++) {

@dgarske dgarske assigned yota22721 and unassigned cconlon and dgarske Jan 20, 2023
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

3 participants