41 scram_escape (
const char *str)
43 char *out = malloc (strlen (str) * 3 + 1);
79 char *username = NULL;
90 username = scram_escape (cf->
username);
96 authzid = scram_escape (cf->
authzid);
104 n = asprintf (out,
"%c%s%s,%s%s,n=%s,r=%s",
106 cf->
cbflag ==
'p' ?
"=" :
"",
114 if (n <= 0 || *out == NULL)
133 n = asprintf (out,
"r=%s,s=%s,i=%lu",
135 if (n <= 0 || *out == NULL)
155 if (n <= 0 || *out == NULL)
174 n = asprintf (out,
"v=%s", sl->
verifier);
175 if (n <= 0 || *out == NULL)
int scram_print_client_first(struct scram_client_first *cf, char **out)
int scram_print_client_final(struct scram_client_final *cl, char **out)
int scram_print_server_final(struct scram_server_final *sl, char **out)
int scram_print_server_first(struct scram_server_first *sf, char **out)
bool scram_valid_client_first(struct scram_client_first *cf)
bool scram_valid_server_final(struct scram_server_final *sl)
bool scram_valid_server_first(struct scram_server_first *sf)
bool scram_valid_client_final(struct scram_client_final *cl)