| Electronic Components Datasheet Search |
|
AN4683 Datasheet(PDF) 22 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4683 Datasheet(HTML) 22 Page - STMicroelectronics |
|
22 / 31 page ![]() Demonstration package AN4683 22/31 DocID027745 Rev 1 3.5 Example 3: Gmail SMTP server access with anonymous negotiation To protect SMTP communications, server can use SSL/TLS encryption to provide authentication and information encryption. To enable the SMTP client to verify the SMTP server certificate, the issuing CA certificates should be made available to the client. In this case the CA certificate is not provided and the client is not expected to verify server certificate. Even the SMTP client is not providing its certificate, so the negotiation is anonymous. For the purpose of the example, the Gmail SMTP server is used. Since it requires SMTP authorization, a Gmail account is needed for <username> (the full Gmail address, e.g. example@gmail.com) and <password> options. To access SMTP server, it is recommended to run AT+S.TLSCERT2=clean,all to clean the Flash memory and then open a secure connection on port 465: AT+S.SOCKON=smtp.gmail.com,465,s In this example, the parameter ind is omitted: if enabled, this option requires to read the socket when a pending indication message is received. When the TLS handshake is successful, the AT+S.SOCKON gives back the sock id: only then is it possible to use the AT+S.SOCKW to make the login on Gmail server by sending first “EHLO” command and then “AUTH PLAIN” with your credentials using the base64 encoded username/password. 3.6 Example 4: Xively example with anonymous negotiation Xively is a cloud platform for developing and managing commercial services on the Internet of Things. Xively ensures protected communication channels by using SSL/TLS authentication and encryption. In this example the CA certificate is not provided and the client is not expected to verify the server certificate. The client is not providing its certificate, so the negotiation is anonymous. To access Xively server, it is recommended to run AT+S.TLSCERT2=clean,all to clean the Flash memory and then open a secure connection on port 8091: AT+S.SOCKON=api.xively.com,8091,s In this example the parameter ind is omitted: if enabled, this option requires to read the socket when a pending indication message is received. 3.7 Example 5: connect to HTTPS my.st.com This example shows how to use the Wi-Fi module as a TLS client to connect to a secure HTTPS server and to send/receive HTTP requests/replies. The HTTPS server we want to connect to is https://my.st.com. In this example we are not verifying the server’s certificate (anonymous negotiation), so we are not uploading any certificate to the module. In case you need to authenticate the server, you have to configure the module as in example 2 (properly set the appropriate CA certificate, domain name and time). |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |