(krb5_rd_priv): Fetch the correct session key from auth_context
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2593 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -52,6 +52,7 @@ krb5_rd_priv(krb5_context context,
 | 
				
			|||||||
  EncKrbPrivPart part;
 | 
					  EncKrbPrivPart part;
 | 
				
			||||||
  size_t len;
 | 
					  size_t len;
 | 
				
			||||||
  krb5_data plain;
 | 
					  krb5_data plain;
 | 
				
			||||||
 | 
					  krb5_keyblock *key;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  r = decode_KRB_PRIV (inbuf->data, inbuf->length, &priv, &len);
 | 
					  r = decode_KRB_PRIV (inbuf->data, inbuf->length, &priv, &len);
 | 
				
			||||||
  if (r) 
 | 
					  if (r) 
 | 
				
			||||||
@@ -65,11 +66,20 @@ krb5_rd_priv(krb5_context context,
 | 
				
			|||||||
      goto failure;
 | 
					      goto failure;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* XXX - Is this right? */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (auth_context->local_subkey.keytype)
 | 
				
			||||||
 | 
					      key = &auth_context->local_subkey;
 | 
				
			||||||
 | 
					  else if (auth_context->remote_subkey.keytype)
 | 
				
			||||||
 | 
					      key = &auth_context->remote_subkey;
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					      key = &auth_context->key;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  r = krb5_decrypt (context,
 | 
					  r = krb5_decrypt (context,
 | 
				
			||||||
		    priv.enc_part.cipher.data,
 | 
							    priv.enc_part.cipher.data,
 | 
				
			||||||
		    priv.enc_part.cipher.length,
 | 
							    priv.enc_part.cipher.length,
 | 
				
			||||||
		    priv.enc_part.etype,
 | 
							    priv.enc_part.etype,
 | 
				
			||||||
		    &auth_context->key,
 | 
							    key,
 | 
				
			||||||
		    &plain);
 | 
							    &plain);
 | 
				
			||||||
  if (r) 
 | 
					  if (r) 
 | 
				
			||||||
      goto failure;
 | 
					      goto failure;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user