Ignore:
Timestamp:
Jun 22, 2021, 9:00:19 PM (3 years ago)
Author:
coas-nagasima
Message:

WolfSSLとAzure IoT SDKを更新

Location:
azure_iot_hub_f767zi/trunk/wolfssl-4.7.0
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • azure_iot_hub_f767zi/trunk/wolfssl-4.7.0/wolfssl/wolfcrypt/dh.h

    r457 r464  
    4646    #include <wolfssl/wolfcrypt/async.h>
    4747#endif
     48
     49/* Optional support extended DH public / private keys */
     50#if !defined(WOLFSSL_DH_EXTRA) && (defined(WOLFSSL_QT) || \
     51        defined(OPENSSL_ALL) || defined(WOLFSSL_OPENSSH) || \
     52        defined(WOLFSSL_STATIC_EPHEMERAL))
     53    #define WOLFSSL_DH_EXTRA
     54#endif
     55
    4856typedef struct DhParams {
    49     #ifdef HAVE_FFDHE_Q
     57#ifdef HAVE_FFDHE_Q
    5058    const byte* q;
    5159    word32      q_len;
    52     #endif /* HAVE_FFDHE_Q */
     60#endif /* HAVE_FFDHE_Q */
    5361    const byte* p;
    5462    word32      p_len;
     
    5967/* Diffie-Hellman Key */
    6068struct DhKey {
    61     mp_int p, g, q;                         /* group parameters */
    62 #if defined(WOLFSSL_QT) || defined(OPENSSL_ALL) || defined(WOLFSSL_OPENSSH)
     69    mp_int p, g, q; /* group parameters */
     70#ifdef WOLFSSL_DH_EXTRA
    6371    mp_int pub;
    6472    mp_int priv;
     
    102110
    103111WOLFSSL_API int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key,
    104                            word32);
     112                           word32); /* wc_DhKeyDecode is in asn.c */
     113
    105114WOLFSSL_API int wc_DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g,
    106115                        word32 gSz);
    107116WOLFSSL_API int wc_DhSetKey_ex(DhKey* key, const byte* p, word32 pSz,
    108117                        const byte* g, word32 gSz, const byte* q, word32 qSz);
    109 #if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
    110 WOLFSSL_LOCAL int wc_DhSetFullKeys(DhKey* key,const byte* priv_key,word32 privSz,
    111                                    const byte* pub_key, word32 pubSz);
     118
     119#ifdef WOLFSSL_DH_EXTRA
     120WOLFSSL_API int wc_DhImportKeyPair(DhKey* key, const byte* priv, word32 privSz,
     121                                   const byte* pub, word32 pubSz);
     122WOLFSSL_API int wc_DhExportKeyPair(DhKey* key, byte* priv, word32* pPrivSz,
     123                                   byte* pub, word32* pPubSz);
     124WOLFSSL_LOCAL int wc_DhKeyCopy(DhKey* src, DhKey* dst);
    112125#endif
    113126WOLFSSL_API int wc_DhSetCheckKey(DhKey* key, const byte* p, word32 pSz,
     
    137150#endif /* NO_DH */
    138151#endif /* WOLF_CRYPT_DH_H */
    139 
Note: See TracChangeset for help on using the changeset viewer.