1

(5 replies, posted in wolfSSL)

Dear Kaleb

thank you very much for your reply. Maybe it would be a good idea to put this information in a comment in the code and/or in the porting guideline. It would have saved me a lot of effort.

By the way, this means that the harmony installation (where the settings.h while is located) might need to be specific for each development project, since changes are made within the framework.

Kind Regards

Peter

2

(5 replies, posted in wolfSSL)

Dear Kaleb,

Thank you for your response.

However, please let me know if there is any problem overriding the the setting for WOLFSSL_USER_IO in the settings.h file (<wolfssl/wolfcrypt/settings.h>) .

In this file it is stated:


#ifdef MICROCHIP_PIC32
    /* #define WOLFSSL_MICROCHIP_PIC32MZ */
    #define SIZEOF_LONG_LONG 8
    #define SINGLE_THREADED
    #define WOLFSSL_USER_IO
    #define NO_WRITEV
    #define NO_DEV_RANDOM
    #define NO_FILESYSTEM
    #define USE_FAST_MATH
    #define TFM_TIMING_RESISTANT
    #define NEED_AES_TABLES
    #define WOLFSSL_HAVE_MIN
#endif

As I understand it I need to define MICROCHIP_PIC32 due to my choice of platform (according to WolfSSL manual), and then WOLFSSL_USER_IO will be defined. Can you explain why it is defined, and why it is ok to override?

Kind Regards

Peter

3

(5 replies, posted in wolfSSL)

Hello,

I am using Microchip harmony 1.09 and a PIC32 processor. After clicking in the appropriate fields in the harmony configurator (including TCP IP and WolfSSL) I learned that the flag WOLFSSL_USER_IO flag was set. This surpriced me, I thought that a PIC32 processor, single threaded, without RTOS, would be included in WolfSSL setup. Is it correct that the WOLFSSL_USER_IO flag should be set?

What is the easiest way for me to write Embedsend and EmbedRecieve. Should I tick in the box of Berkeley api in the harmony configurator, and use this api (which seems to have the correct error handling for WolfSSL) or should I use the ArrayPut and ArrayGet that is included in the Harmony?

Kind Regards

Peter Abdelmassih Waller

4

(4 replies, posted in wolfSSL)

Thank you for all help, it gave me hints to continue :-)

it turned out that the time was not set in my pic32 device. I needed to make sure that a connection with the sntp server was established before reading the certificate.

It took me some time to understand that the complete time.h has not been implemented by microchip and that an sntp server call is being made in  pic32_time(time_t* timer).

Kind Regards

Peter

5

(4 replies, posted in wolfSSL)

Hello,

Im trying to use the command WolfSSL_CTX_load_verify_buffer, but I did not understand how I should format the certificate in order to be acceptable to this command.

according to the online api documentation, I understand that I can choose from asn1 or pem format. However the examples I find uses der format.

I think I should use der format and write the der format like this:

static const unsigned char ca_cert_der_2048[] =
{
    0x30, 0x82, 0x04, 0xE0, 0x30, 0x82, 0x03, 0xC8, 0xA0, 0x03,
    0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0xA6, 0x66, 0x38, 0x49,
.....

Is this correct?

If so, which flag should I use in the loading command? SSL_FILETYPE_PEM ?

Kind Regards

Peter
PS. By the way, I have both PEM and DER format, maybe I should write like this to use PEM:
const unsigned char caCertificate_root[] = "-----BEGIN CERTIFICATE-----MIIFazCCA...."
or?
DS

A clarification:

Im using MPLAB Harmony 1.09.

Kind Regards

Peter

Dear all,

I am using Microchip PIC32MZ1024ECM064 with MPLAB IDE, MPLAB Harmony,  and MPLAB Harmony Configurator.

This means that I can use a graphical configuration tool to set that I want to use wolfssl and PIC32MZ Hardware Cryptography.  I then click generate code and try to complile. Then many build error occurs, which can be solved if the WOLFSSL_MICROCHIP_PIC32MZ flag is defined.

The software builds without error if  I generate code without selecting PIC32MZ Hardware Cryptography.

In the wolfSSL manual (https://www.wolfssl.com/documentation/w … Manual.pdf) section 4.4 it is not stated that WolfSSL supports PIC32MZ Hardware Cryptography (out of the box).

I also understand that the WOLFSSL_MICROCHIP_PIC32MZAn is related to the hardware cryptography (https://developer.mbed.org/users/wolfSS … settings.h)


All this is confusing for me. I dont know if there is a problem with the Microchip programing tools, or if there is problem to use WolfSSL this way. Please try to answer my questions below and to give other clarifications that I might need..

1) Does WolfSSL support using the PIC32MZ1024ECM064 hardware cryptographic engine?

2) Can I use Harmony Configurator to configure Wolfssl to use the PIC32MZ1024ECM064 hardware cryptographic engine?

3) What does it mean with the statement in section 4.4 in the manual: "wolfSSL is able to take advantage of several hardware accelerated (or “assisted”) crypto functionalities in various processors and chips. The following sections explain
which technologies wolfSSL supports out-of-the-box.."

Is there another way that is not "out of the box"?



Kind Regards

Peter Abdelmassih Waller

However