int SSL_srp_server_param_with_username(SSL *s, int *ad)
	{
	unsigned char b[SSL_MAX_MASTER_KEY_LENGTH];
	int al;

	*ad = SSL_AD_UNKNOWN_SRP_USERNAME;
	if ((s->srp_ctx.TLS_ext_srp_username_callback !=NULL) &&
		((al = s->srp_ctx.TLS_ext_srp_username_callback(s, ad, s->srp_ctx.SRP_cb_arg))!=SSL_ERROR_NONE))
			return al;

	*ad = SSL_AD_INTERNAL_ERROR;
	if ((s->srp_ctx.N == NULL) ||
		(s->srp_ctx.g == NULL) ||
		(s->srp_ctx.s == NULL) ||
		(s->srp_ctx.v == NULL))
		return SSL3_AL_FATAL;

	if (RAND_bytes(b, sizeof(b)) <= 0)
		return SSL3_AL_FATAL;
	s->srp_ctx.b = BN_bin2bn(b,sizeof(b),NULL);
	OPENSSL_cleanse(b,sizeof(b));

	/* Calculate:  B = (kv + g^b) % N  */

	return ((s->srp_ctx.B = SRP_Calc_B(s->srp_ctx.b, s->srp_ctx.N, s->srp_ctx.g, s->srp_ctx.v)) != NULL)?
			SSL_ERROR_NONE:SSL3_AL_FATAL;
	}
int SSL_srp_server_param_with_username(SSL *s, int *ad)
	{
	unsigned char b[SSL_MAX_MASTER_KEY_LENGTH];
	int al;

	*ad = SSL_AD_UNKNOWN_SRP_USERNAME;
	if ((s->srp_ctx.TLS_ext_srp_username_callback !=NULL) &&
		((al = s->srp_ctx.TLS_ext_srp_username_callback(s, ad, s->srp_ctx.SRP_cb_arg))!=SSL_ERROR_NONE))
			return al;

	*ad = SSL_AD_INTERNAL_ERROR;
	if ((s->srp_ctx.N == NULL) ||
		(s->srp_ctx.g == NULL) ||
		(s->srp_ctx.s == NULL) ||
		(s->srp_ctx.v == NULL))
		return SSL3_AL_FATAL;

	if (RAND_bytes(b, sizeof(b)) <= 0)
		return SSL3_AL_FATAL;
	s->srp_ctx.b = BN_bin2bn(b,sizeof(b),NULL);
	OPENSSL_cleanse(b,sizeof(b));

	 

	return ((s->srp_ctx.B = SRP_Calc_B(s->srp_ctx.b, s->srp_ctx.N, s->srp_ctx.g, s->srp_ctx.v)) != NULL)?
			SSL_ERROR_NONE:SSL3_AL_FATAL;
	}