If integrity is requested by any party then the MIC, if requested by the
server will be generated, otherwise it will not be.
&target_info,
server_name,
&client_target_info,
- &srv_time, &add_mic);
+ &srv_time,
+ protect ? &add_mic: NULL);
if (retmin) {
if (retmin == ERR_DECODE) {
retmaj = GSS_S_DEFECTIVE_TOKEN;
/* the server did not send the timestamp, use current time */
if (srv_time == 0) {
srv_time = ntlm_timestamp_now();
- } else {
+ } else if (add_mic) {
av_flags |= MSVAVFLAGS_MIC_PRESENT;
*add_mic = true;
}
* @param server The Client Supplied Server Name if available
* @param out The processed target_info buffer
* @param out_srv_time A 64 bit FILETIME timestamp
- * @param add_mic Whether the caller should generate a MIC
+ * @param add_mic A pointer to a boolean. If NULL MIC flags will
+ * not be set, otherwise if allowed the MIC flag
+ * will be set and true will be returned.
*
* @return 0 if everyting parses correctly, or an error code
*/