"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/vauth/krb5_gssapi.c" between
curl-7.65.3.tar.xz and curl-7.66.0.tar.xz

About: cURL is a powerful commandline tool to transfer data from or to a server, using one of the supported protocols HTTP(S), FTP(S), SCP, SFTP, TFTP, DICT, TELNET, LDAP(S) or FILE.

krb5_gssapi.c  (curl-7.65.3.tar.xz):krb5_gssapi.c  (curl-7.66.0.tar.xz)
skipping to change at line 124 skipping to change at line 124
/* Import the SPN */ /* Import the SPN */
major_status = gss_import_name(&minor_status, &spn_token, major_status = gss_import_name(&minor_status, &spn_token,
GSS_C_NT_HOSTBASED_SERVICE, &krb5->spn); GSS_C_NT_HOSTBASED_SERVICE, &krb5->spn);
if(GSS_ERROR(major_status)) { if(GSS_ERROR(major_status)) {
Curl_gss_log_error(data, "gss_import_name() failed: ", Curl_gss_log_error(data, "gss_import_name() failed: ",
major_status, minor_status); major_status, minor_status);
free(spn); free(spn);
return CURLE_OUT_OF_MEMORY; return CURLE_AUTH_ERROR;
} }
free(spn); free(spn);
} }
if(chlg64 && *chlg64) { if(chlg64 && *chlg64) {
/* Decode the base-64 encoded challenge message */ /* Decode the base-64 encoded challenge message */
if(*chlg64 != '=') { if(*chlg64 != '=') {
result = Curl_base64_decode(chlg64, &chlg, &chlglen); result = Curl_base64_decode(chlg64, &chlg, &chlglen);
if(result) if(result)
skipping to change at line 171 skipping to change at line 171
/* Free the decoded challenge as it is not required anymore */ /* Free the decoded challenge as it is not required anymore */
free(input_token.value); free(input_token.value);
if(GSS_ERROR(major_status)) { if(GSS_ERROR(major_status)) {
if(output_token.value) if(output_token.value)
gss_release_buffer(&unused_status, &output_token); gss_release_buffer(&unused_status, &output_token);
Curl_gss_log_error(data, "gss_init_sec_context() failed: ", Curl_gss_log_error(data, "gss_init_sec_context() failed: ",
major_status, minor_status); major_status, minor_status);
return CURLE_RECV_ERROR; return CURLE_AUTH_ERROR;
} }
if(output_token.value && output_token.length) { if(output_token.value && output_token.length) {
/* Base64 encode the response */ /* Base64 encode the response */
result = Curl_base64_encode(data, (char *) output_token.value, result = Curl_base64_encode(data, (char *) output_token.value,
output_token.length, outptr, outlen); output_token.length, outptr, outlen);
gss_release_buffer(&unused_status, &output_token); gss_release_buffer(&unused_status, &output_token);
} }
else if(mutual_auth) { else if(mutual_auth) {
skipping to change at line 255 skipping to change at line 255
/* Get the fully qualified username back from the context */ /* Get the fully qualified username back from the context */
major_status = gss_inquire_context(&minor_status, krb5->context, major_status = gss_inquire_context(&minor_status, krb5->context,
&username, NULL, NULL, NULL, NULL, &username, NULL, NULL, NULL, NULL,
NULL, NULL); NULL, NULL);
if(GSS_ERROR(major_status)) { if(GSS_ERROR(major_status)) {
Curl_gss_log_error(data, "gss_inquire_context() failed: ", Curl_gss_log_error(data, "gss_inquire_context() failed: ",
major_status, minor_status); major_status, minor_status);
free(chlg); free(chlg);
return CURLE_OUT_OF_MEMORY; return CURLE_AUTH_ERROR;
} }
/* Convert the username from internal format to a displayable token */ /* Convert the username from internal format to a displayable token */
major_status = gss_display_name(&minor_status, username, major_status = gss_display_name(&minor_status, username,
&username_token, NULL); &username_token, NULL);
if(GSS_ERROR(major_status)) { if(GSS_ERROR(major_status)) {
Curl_gss_log_error(data, "gss_display_name() failed: ", Curl_gss_log_error(data, "gss_display_name() failed: ",
major_status, minor_status); major_status, minor_status);
free(chlg); free(chlg);
return CURLE_OUT_OF_MEMORY; return CURLE_AUTH_ERROR;
} }
/* Setup the challenge "input" security buffer */ /* Setup the challenge "input" security buffer */
input_token.value = chlg; input_token.value = chlg;
input_token.length = chlglen; input_token.length = chlglen;
/* Decrypt the inbound challenge and obtain the qop */ /* Decrypt the inbound challenge and obtain the qop */
major_status = gss_unwrap(&minor_status, krb5->context, &input_token, major_status = gss_unwrap(&minor_status, krb5->context, &input_token,
&output_token, NULL, &qop); &output_token, NULL, &qop);
if(GSS_ERROR(major_status)) { if(GSS_ERROR(major_status)) {
skipping to change at line 358 skipping to change at line 358
/* Encrypt the data */ /* Encrypt the data */
major_status = gss_wrap(&minor_status, krb5->context, 0, major_status = gss_wrap(&minor_status, krb5->context, 0,
GSS_C_QOP_DEFAULT, &input_token, NULL, GSS_C_QOP_DEFAULT, &input_token, NULL,
&output_token); &output_token);
if(GSS_ERROR(major_status)) { if(GSS_ERROR(major_status)) {
Curl_gss_log_error(data, "gss_wrap() failed: ", Curl_gss_log_error(data, "gss_wrap() failed: ",
major_status, minor_status); major_status, minor_status);
free(message); free(message);
return CURLE_OUT_OF_MEMORY; return CURLE_AUTH_ERROR;
} }
/* Base64 encode the response */ /* Base64 encode the response */
result = Curl_base64_encode(data, (char *) output_token.value, result = Curl_base64_encode(data, (char *) output_token.value,
output_token.length, outptr, outlen); output_token.length, outptr, outlen);
/* Free the output buffer */ /* Free the output buffer */
gss_release_buffer(&unused_status, &output_token); gss_release_buffer(&unused_status, &output_token);
/* Free the message buffer */ /* Free the message buffer */
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)