This week I worked on the Generic HTTP Client with SSL. Initially I tried to run the original program provided by the MICROCHIP TCPIP stack. I enabled the STACK_USE_SSL_CLIENT in TCPIP ETH97.h found in TCPIP Config.h . Then I added the RSA.c and ARCFOUR.c files which were necessary in order to to run the SSL algorithm. RSA is the library for an algorithm for public key decryption. I compiled the file and built it, however I kept getting the error “RSAInit() not found”.

In order to troubleshoot this problem, I went through StackTsk.c to find out where it is implemented. At that point I found out that the function was implemented is STACK_USE_RSA was defined. I followed the definition to check where it was declared and realized that STACK_USE_RSA was defined only when STACK_USE_RSA_ENCRYPT was defined. This condition also defines STACK_USE_BIGINIT. Following this I found that STACK_USE_RSA_ENCRYPT was defined only when STACK_USE_SSL_CLIENT was defined. The definition hierarchy is summarized below in figure 1:

As seen from figure 1, the functions in RSA.c were required for SSL to work so I checked the RSA.h and found that all the functions were defined. Moreover in RSA.c I could not find the function prototypes. The reason for this was that the encryption portion for the module had to be obtained separately from MICROCHIP due to US Export Restriction.

At that point I searched on-line to see if there were any other ways of running the SSL client and did not come to any definitive conclusion as the RSA algorithm is crucial for SSL. Therefore the original program could not be run until the module was obtained.

 ImageFigure 1: Include Heirarchy


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.