@@ -15936,3 +15936,51 @@ WOLFSSL_CIPHERSUITE_INFO wolfSSL_get_ciphersuite_info(byte first,
1593615936*/
1593715937int wolfSSL_get_sigalg_info (byte first , byte second ,
1593815938 int * hashAlgo , int * sigAlgo );
15939+
15940+ /*!
15941+ \brief This function will set the password callback in the provided CTX.
15942+ This callback is used when loading an encrypted cert or key which requires
15943+ a password.
15944+
15945+ \param ctx a pointer to a WOLFSSL_CTX structure, created with
15946+ wolfSSL_CTX_new().
15947+ \param cb a function pointer to (*wc_pem_password_cb) that is set to the
15948+ passwd_cb member of the WOLFSSL_CTX.
15949+
15950+ _Example_
15951+ \code
15952+ WOLFSSL_CTX* ctx = wolfSSL_CTX_new( protocol method );
15953+ int PasswordCallBack(char* passwd, int sz, int rw, void* userdata) {
15954+
15955+ }
15956+ …
15957+ wolfSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack);
15958+ \endcode
15959+
15960+ \sa wolfSSL_CTX_set_default_passwd_cb_userdata
15961+ */
15962+ void wolfSSL_CTX_set_default_passwd_cb (WOLFSSL_CTX * ctx ,
15963+ wc_pem_password_cb * cb );
15964+
15965+ /*!
15966+ \brief This function will set the userdata argument to the passwd_userdata
15967+ member of the WOLFSSL_CTX structure.
15968+ This member is passed into the CTX's password callback when called.
15969+
15970+ \param ctx a pointer to a WOLFSSL_CTX structure, created with
15971+ wolfSSL_CTX_new().
15972+ \param userdata a pointer to userdata which is passed into the
15973+ password callback.
15974+
15975+ _Example_
15976+ \code
15977+ WOLFSSL_CTX* ctx = wolfSSL_CTX_new( protocol method );
15978+ int data;
15979+ …
15980+ wolfSSL_CTX_set_default_passwd_cb_userdata(ctx, (void*)&data);
15981+ \endcode
15982+
15983+ \sa wolfSSL_CTX_set_default_passwd_cb
15984+ */
15985+ void wolfSSL_CTX_set_default_passwd_cb_userdata (WOLFSSL_CTX * ctx ,
15986+ void * userdata );
0 commit comments