indent, return error code
This commit is contained in:
		| @@ -1848,8 +1848,10 @@ verify_checksum(krb5_context context, | |||||||
|     if(ct->checksumsize != cksum->checksum.length) { |     if(ct->checksumsize != cksum->checksum.length) { | ||||||
| 	krb5_clear_error_message (context); | 	krb5_clear_error_message (context); | ||||||
| 	krb5_set_error_message(context, KRB5KRB_AP_ERR_BAD_INTEGRITY, | 	krb5_set_error_message(context, KRB5KRB_AP_ERR_BAD_INTEGRITY, | ||||||
| 				N_("Decrypt integrity check failed for checksum type %s, length was %u, expected %u", ""), | 			       N_("Decrypt integrity check failed for checksum type %s, " | ||||||
| 				ct->name, (unsigned)cksum->checksum.length, (unsigned)ct->checksumsize); | 				  "length was %u, expected %u", ""), | ||||||
|  | 			       ct->name, (unsigned)cksum->checksum.length, | ||||||
|  | 			       (unsigned)ct->checksumsize); | ||||||
|  |  | ||||||
| 	return KRB5KRB_AP_ERR_BAD_INTEGRITY; /* XXX */ | 	return KRB5KRB_AP_ERR_BAD_INTEGRITY; /* XXX */ | ||||||
|     } |     } | ||||||
| @@ -1880,11 +1882,11 @@ verify_checksum(krb5_context context, | |||||||
| 	dkey = NULL; | 	dkey = NULL; | ||||||
|     if(ct->verify) { |     if(ct->verify) { | ||||||
| 	ret = (*ct->verify)(context, dkey, data, len, usage, cksum); | 	ret = (*ct->verify)(context, dkey, data, len, usage, cksum); | ||||||
| 	if (ret == KRB5KRB_AP_ERR_BAD_INTEGRITY) { | 	krb5_set_error_message(context, ret,  | ||||||
| 	    krb5_set_error_message (context, KRB5KRB_AP_ERR_BAD_INTEGRITY, | 			       N_("Decrypt integrity check failed for checksum " | ||||||
| 				    N_("Decrypt integrity check failed for checksum type %s, key type %s", ""), | 				  "type %s, key type %s", ""), | ||||||
| 			       ct->name, crypto->et->name); | 			       ct->name, crypto->et->name); | ||||||
| 	} | 	return ret; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     ret = krb5_data_alloc (&c.checksum, ct->checksumsize); |     ret = krb5_data_alloc (&c.checksum, ct->checksumsize); | ||||||
| @@ -1900,10 +1902,11 @@ verify_checksum(krb5_context context, | |||||||
|     if(c.checksum.length != cksum->checksum.length || |     if(c.checksum.length != cksum->checksum.length || | ||||||
|        ct_memcmp(c.checksum.data, cksum->checksum.data, c.checksum.length)) { |        ct_memcmp(c.checksum.data, cksum->checksum.data, c.checksum.length)) { | ||||||
| 	krb5_clear_error_message (context); | 	krb5_clear_error_message (context); | ||||||
| 	krb5_set_error_message (context, KRB5KRB_AP_ERR_BAD_INTEGRITY, |  | ||||||
| 				N_("Decrypt integrity check failed for checksum type %s, key type %s", ""), |  | ||||||
| 				ct->name, crypto->et->name); |  | ||||||
| 	ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; | 	ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; | ||||||
|  | 	krb5_set_error_message(context, ret, | ||||||
|  | 			       N_("Decrypt integrity check failed for checksum " | ||||||
|  | 				  "type %s, key type %s", ""), | ||||||
|  | 			       ct->name, crypto->et->name); | ||||||
|     } else { |     } else { | ||||||
| 	ret = 0; | 	ret = 0; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hornquist Astrand
					Love Hornquist Astrand