L_CTX_new(TLS_client_method());
 if (!ctx)
     /* Error */
 if (!SSL_CTX_set_srp_username(ctx, username))
     /* Error */
 if (!SSL_CTX_set_srp_password(ctx, password))
     /* Error */</code></pre>

<p>Setup SRP server with verifier file:</p>

<pre><code> #include &lt;openssl/srp.h&gt;
 #include &lt;openssl/ssl.h&gt;

 const char *srpvfile = &quot;password.srpv&quot;;

 int srpServerCallback(SSL *s, int *ad, void *arg)
 {
     SRP_VBASE *srpData = (SRP_VBASE*) arg;
     char *username = SSL_get_srp_usern