rename roken base64, fixes #107

This commit is contained in:
Love Hörnquist Åstrand
2014-08-22 20:57:24 -07:00
parent ad9cd6a138
commit 37afa01be3
16 changed files with 35 additions and 35 deletions

View File

@@ -213,7 +213,7 @@ gss_adat(void *app_data, void *buf, size_t len)
free(bindings);
if(output_token.length) {
if(base64_encode(output_token.value, output_token.length, &p) < 0) {
if(rk_base64_encode(output_token.value, output_token.length, &p) < 0) {
reply(535, "Out of memory base64-encoding.");
return -1;
}
@@ -421,7 +421,7 @@ gss_auth(void *app_data, char *host)
input.length = 0;
}
if (output_token.length != 0) {
base64_encode(output_token.value, output_token.length, &p);
rk_base64_encode(output_token.value, output_token.length, &p);
gss_release_buffer(&min_stat, &output_token);
n = command("ADAT %s", p);
free(p);
@@ -444,7 +444,7 @@ gss_auth(void *app_data, char *host)
} else {
p+=5;
input.value = malloc(strlen(p));
input.length = base64_decode(p, input.value);
input.length = rk_base64_decode(p, input.value);
}
} else {
if(code != 235) {

View File

@@ -348,7 +348,7 @@ sec_read_msg(char *s, int level)
int return_code;
buf = malloc(strlen(s));
len = base64_decode(s + 4, buf); /* XXX */
len = rk_base64_decode(s + 4, buf); /* XXX */
len = (*mech->decode)(app_data, buf, len, level);
if(len < 0)
@@ -386,7 +386,7 @@ sec_vfprintf(FILE *f, const char *fmt, va_list ap)
printf("Failed to encode command.\n");
return -1;
}
if(base64_encode(enc, len, &buf) < 0){
if(rk_base64_encode(enc, len, &buf) < 0){
free(enc);
printf("Out of memory base64-encoding.\n");
return -1;
@@ -469,7 +469,7 @@ adat(char *auth_data)
if(mech && !sec_complete) {
void *buf = malloc(strlen(auth_data));
size_t len;
len = base64_decode(auth_data, buf);
len = rk_base64_decode(auth_data, buf);
(*mech->adat)(app_data, buf, len);
free(buf);
} else
@@ -554,7 +554,7 @@ void mec(char *msg, enum protection_level level)
reply(501, "Failed to allocate %lu", (unsigned long)buf_size);
return;
}
len = base64_decode(msg, buf);
len = rk_base64_decode(msg, buf);
command_prot = level;
if(len == (size_t)-1) {
free(buf);

View File

@@ -392,7 +392,7 @@ main(int argc, char **argv)
if (len == 0)
errx(1, "invalid Negotiate token");
input_token.value = emalloc(len);
len = base64_decode(&h[i], input_token.value);
len = rk_base64_decode(&h[i], input_token.value);
if (len < 0)
errx(1, "invalid base64 Negotiate token %s", &h[i]);
input_token.length = len;
@@ -475,9 +475,9 @@ main(int argc, char **argv)
if (output_token.length) {
char *neg_token;
base64_encode(output_token.value,
output_token.length,
&neg_token);
rk_base64_encode(output_token.value,
output_token.length,
&neg_token);
asprintf(&headers[num_headers++], "Authorization: Negotiate %s",
neg_token);