emSSL server certificate verification

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • emSSL server certificate verification

    Hi,
    I'm using emSSL with embOS/IP and embOS and i would like to have more informations about some functionnalities of emSSL.
    Presently, i'm using this stack as a client and i would like to use the certificate verify API in the structure "SSL_CERITIFCATE_API":

    typedef struct SSL_CERITIFCATE_API_tag {
    int (*pfVerifyCertificate) (SSL_SESSION *pSession, SSL_TLV *pTLV, SSL_CERTIFICATE_DATA *pCertificate);
    int (*pfGetCertificate) (SSL_SESSION *pSession, unsigned Index, const U8 **ppData, unsigned *pDataLen);
    int (*pfGetPrivateKey) (SSL_SESSION *pSession, const U8 **ppKey, unsigned *pKeyLen);
    } SSL_CERITIFCATE_API;

    This verification is necessary because it is now mandatory to verify the server certificate to avoid the "man in the middle attack".
    I didn't find any examples how to use this API.
    Moreover, the SSL_Connect function doesn't return an error when nothing is set in the VerifyCertificate field.
    Is it possible to configure emSSL so that the ssl_connect function does not establish the connection if the certificate verifcation is not correct ( expired, revoked, Bad...)?


    Best regards,

    Benoitm
  • Hi Benoitm,

    With the next update of emSSL, which is planned for next week,
    automatic verification of certificates up to installable root certificates is easily possible.
    You will get the update through the MyAccount system.
    Since you are in support for emSSL, feel free to contact us directly at support_smssl@segger.com

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.