This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于cc3200 ssl带密码的密匙文件



#define SL_SO_SECURE_FILES_PRIVATE_KEY_FILE_NAME (30) /* This option used to configue secure file */
#define SL_SO_SECURE_FILES_CERTIFICATE_FILE_NAME (31) /* This option used to configue secure file */
#define SL_SO_SECURE_FILES_CA_FILE_NAME (32) /* This option used to configue secure file */
#define SL_SO_SECURE_FILES_DH_KEY_FILE_NAME (33) /* This option used to configue secure file */

看了TI的ssl例程可以设置ca.crt client.key 和 client.crt,但是如果密匙文件带密码了在哪里设置密码?

  • 在应用中定义
    The TLS/SSL Files/Variables can be defined and mapped to a socket using the following code.

    typedef struct
    {
    unsigned char PrivateKey;
    unsigned char Certificate;
    unsigned char CA;
    unsigned char DH;
    } SlSockSecureFiles_t;

    SlSockSecureFiles_t SecureFiles;
    sockSecureFiles.secureFiles[0] = 0; // mapping private key, 0 file not exist
    sockSecureFiles.secureFiles[1] = 0; // mapping certificate, 0 file not exist
    sockSecureFiles.secureFiles[2] = SL_SSL_CA_CERT/*129*/; // mapping CA, 0 file not exist
    sockSecureFiles.secureFiles[3] = 0; // mapping certificate, 0 file not exist

    Status = sl_SetSockOpt(SockID, SL_SOL_SOCKET, SL_SO_SEC_FILES, &SecureFiles, sizeof(SlSockSecureFiles));