TCP/IP User’s Manual, Vol. 3 rabbit.com 3
Table of Contents
1. Introduction......................................................... 5
2. Secure Sockets Layer (SSL) Protocol................ 6
2.1 Overview of SSL Information........................ 7
2.2 Hardware and Software Requirements........... 8
2.3 SSL Walk-Through......................................... 8
2.3.1 Create a Digital Certificate ....................8
2.3.2 Import the Certificate ...........................16
2.3.3 Set Up TCP/IP for the Sample Application
16
2.3.4 Set Up the Application to Use SSL .....17
2.3.5 Set Up the Web Browser ......................17
2.3.6 Run the Application .............................18
2.3.7 Expected Behavior ...............................19
2.3.8 Troubleshooting ...................................19
2.4 SSL Basics.................................................... 20
2.4.1 The Handshake ....................................20
2.4.2 SSL Session .........................................22
2.4.3 SSL Alerts ............................................22
2.5 SSL on the Rabbit......................................... 22
2.5.1 Full-Compliance Vs. Communication .22
2.5.2 SSLv2 Compatibility ...........................23
2.5.3 Session Renegotiation ..........................23
2.6 SSL/TLS Socket API.................................... 24
2.6.1 General Usage Guidelines ...................24
2.6.2 Peer Authentication .............................25
2.6.3 Considerations for Application
Development ..................................26
2.6.4 Certificate API .....................................29
2.6.5 Troubleshooting ...................................30
2.6.6 Built-in TLS Application Protocol Support
30
2.7 HTTPS Support............................................ 32
2.7.1 Browser Support ..................................32
2.7.2 Sockets and HTTPS Configuration .....32
2.7.3 Resource Protection .............................33
2.7.4 Error Handling .....................................33
2.7.5 HTTPS Sample Programs ....................34
2.8 SSL/TLS and HTTPS API Reference.......... 35
2.8.1 Configuration Macros ..........................35
2.8.2 SSL/TLS Socket API Functions ..........37
2.8.3 HTTPS Socket Wrapper Functions .....52
2.8.4 Certificate Handling API Functions ....60
2.9 Rabbit Certificate Utility.............................. 70
2.9.1 The Wizard Interface ........................... 70
2.9.2 The Advanced Interface ...................... 71
2.9.3 Creating and Loading Device Certificate
Lists ............................................... 71
2.9.4 Certificate Output Directory ................ 72
2.9.5 Signing Options ................................... 72
2.9.6 The Certificate Edit Pane .................... 73
2.9.7 Generating Certificates ........................ 74
2.9.8 The Edit Certificate Dialog ................. 75
2.9.9 The Signed Certificate Converter ........ 77
3. Advanced Encryption Standard (AES) .......... 84
3.1 Getting Started ............................................. 84
3.2 Rabbit Specifics ........................................... 85
3.3 AES Sample Program Summaries ............... 85
3.4 Sample Program Code ................................. 86
3.5 AES Macros and API Functions.................. 88
3.5.1 Configuration Macros .......................... 88
3.5.2 API Functions ...................................... 88
4. Wi-Fi Enterprise Mode Authentication........ 107
4.1 EAP Methods............................................. 108
4.1.1 Digital Certificates ............................ 108
4.1.2 Username/Password Protocols ...........110
4.1.3 Device Compatibility .........................111
4.1.4 Troubleshooting Tips ..........................111
4.2 Sample Programs ........................................ 112
4.2.1 Code Details .......................................112
4.2.2 Configuration Macros .........................114
4.2.3 Configuration Parameters for ifconfig() 114
Appendix A. Cryptography and
Message Verification............................. 117
A.1 Cryptography.............................................. 117
A.1.1 Symmetric-Key Cryptography ......... 117
A.1.2 Public-Key Cryptography ................. 117
A.1.3 The Importance of Randomness ....... 118
A.1.4 Message Verification with Hashing . 118
A.1.5 MD5, SHA-1, and HMAC ................ 118
A.1.6 P-HASH and PRF Algorithms ......... 118
Appendix B. SSL Certificates............................. 119
B.1 What is a Digital Certificate?..................... 119
B.2 What’s in a Certificate? ............................. 120