changes for modified auth_context
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4156 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -89,7 +89,7 @@ OM_uint32 gss_get_mic
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->local_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->local_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
des_cbc_cksum ((des_cblock *)hash,
|
des_cbc_cksum ((des_cblock *)hash,
|
||||||
|
@@ -89,7 +89,7 @@ OM_uint32 gss_get_mic
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->local_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->local_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
des_cbc_cksum ((des_cblock *)hash,
|
des_cbc_cksum ((des_cblock *)hash,
|
||||||
|
@@ -88,7 +88,7 @@ OM_uint32 gss_unwrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->remote_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->remote_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
for (i = 0; i < sizeof(key); ++i)
|
for (i = 0; i < sizeof(key); ++i)
|
||||||
key[i] ^= 0xf0;
|
key[i] ^= 0xf0;
|
||||||
@@ -123,7 +123,7 @@ OM_uint32 gss_unwrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->remote_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->remote_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
des_cbc_cksum ((des_cblock *)hash,
|
des_cbc_cksum ((des_cblock *)hash,
|
||||||
|
@@ -84,7 +84,7 @@ OM_uint32 gss_verify_mic
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->remote_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->remote_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
|
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
|
@@ -122,7 +122,7 @@ OM_uint32 gss_wrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->local_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->local_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
des_cbc_cksum ((des_cblock *)hash,
|
des_cbc_cksum ((des_cblock *)hash,
|
||||||
@@ -159,7 +159,7 @@ OM_uint32 gss_wrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->local_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->local_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
for (i = 0; i < sizeof(key); ++i)
|
for (i = 0; i < sizeof(key); ++i)
|
||||||
key[i] ^= 0xf0;
|
key[i] ^= 0xf0;
|
||||||
|
@@ -88,7 +88,7 @@ OM_uint32 gss_unwrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->remote_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->remote_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
for (i = 0; i < sizeof(key); ++i)
|
for (i = 0; i < sizeof(key); ++i)
|
||||||
key[i] ^= 0xf0;
|
key[i] ^= 0xf0;
|
||||||
@@ -123,7 +123,7 @@ OM_uint32 gss_unwrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->remote_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->remote_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
des_cbc_cksum ((des_cblock *)hash,
|
des_cbc_cksum ((des_cblock *)hash,
|
||||||
|
@@ -84,7 +84,7 @@ OM_uint32 gss_verify_mic
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->remote_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->remote_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
|
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
|
@@ -122,7 +122,7 @@ OM_uint32 gss_wrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->local_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->local_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
des_set_key (&key, schedule);
|
des_set_key (&key, schedule);
|
||||||
des_cbc_cksum ((des_cblock *)hash,
|
des_cbc_cksum ((des_cblock *)hash,
|
||||||
@@ -159,7 +159,7 @@ OM_uint32 gss_wrap
|
|||||||
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->key.keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
#endif
|
#endif
|
||||||
memcpy (&key, context_handle->auth_context->local_subkey.keyvalue.data,
|
memcpy (&key, context_handle->auth_context->local_subkey->keyvalue.data,
|
||||||
sizeof(key));
|
sizeof(key));
|
||||||
for (i = 0; i < sizeof(key); ++i)
|
for (i = 0; i < sizeof(key); ++i)
|
||||||
key[i] ^= 0xf0;
|
key[i] ^= 0xf0;
|
||||||
|
@@ -101,7 +101,7 @@ krb5_get_forwarded_creds (krb5_context context,
|
|||||||
enctype = auth_context->enctype;
|
enctype = auth_context->enctype;
|
||||||
else {
|
else {
|
||||||
ret = krb5_keytype_to_etype (context,
|
ret = krb5_keytype_to_etype (context,
|
||||||
auth_context->local_subkey.keytype,
|
auth_context->local_subkey->keytype,
|
||||||
&enctype);
|
&enctype);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -228,7 +228,7 @@ krb5_get_forwarded_creds (krb5_context context,
|
|||||||
len,
|
len,
|
||||||
enctype,
|
enctype,
|
||||||
0,
|
0,
|
||||||
&auth_context->local_subkey,
|
auth_context->local_subkey,
|
||||||
&cred.enc_part);
|
&cred.enc_part);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
free_KRB_CRED(&cred);
|
free_KRB_CRED(&cred);
|
||||||
|
@@ -61,10 +61,10 @@ krb5_mk_priv(krb5_context context,
|
|||||||
|
|
||||||
/* XXX - Is this right? */
|
/* XXX - Is this right? */
|
||||||
|
|
||||||
if (auth_context->local_subkey.keytype)
|
if (auth_context->local_subkey->keytype)
|
||||||
key = &auth_context->local_subkey;
|
key = auth_context->local_subkey;
|
||||||
else if (auth_context->remote_subkey.keytype)
|
else if (auth_context->remote_subkey->keytype)
|
||||||
key = &auth_context->remote_subkey;
|
key = auth_context->remote_subkey;
|
||||||
else
|
else
|
||||||
key = auth_context->keyblock;
|
key = auth_context->keyblock;
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@ krb5_rd_cred (krb5_context context,
|
|||||||
cred.enc_part.cipher.data,
|
cred.enc_part.cipher.data,
|
||||||
cred.enc_part.cipher.length,
|
cred.enc_part.cipher.length,
|
||||||
cred.enc_part.etype,
|
cred.enc_part.etype,
|
||||||
&auth_context->remote_subkey,
|
auth_context->remote_subkey,
|
||||||
&enc_krb_cred_part_data);
|
&enc_krb_cred_part_data);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
@@ -68,10 +68,10 @@ krb5_rd_priv(krb5_context context,
|
|||||||
|
|
||||||
/* XXX - Is this right? */
|
/* XXX - Is this right? */
|
||||||
|
|
||||||
if (auth_context->local_subkey.keytype)
|
if (auth_context->local_subkey->keytype)
|
||||||
key = &auth_context->local_subkey;
|
key = auth_context->local_subkey;
|
||||||
else if (auth_context->remote_subkey.keytype)
|
else if (auth_context->remote_subkey->keytype)
|
||||||
key = &auth_context->remote_subkey;
|
key = auth_context->remote_subkey;
|
||||||
else
|
else
|
||||||
key = auth_context->keyblock;
|
key = auth_context->keyblock;
|
||||||
|
|
||||||
|
@@ -238,8 +238,9 @@ krb5_verify_ap_req(krb5_context context,
|
|||||||
/* And where should it be stored? */
|
/* And where should it be stored? */
|
||||||
|
|
||||||
if (ac->authenticator->subkey) {
|
if (ac->authenticator->subkey) {
|
||||||
copy_EncryptionKey (ac->authenticator->subkey,
|
krb5_copy_keyblock(context,
|
||||||
&ac->remote_subkey);
|
ac->authenticator->subkey,
|
||||||
|
&ac->remote_subkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ap_req_options) {
|
if (ap_req_options) {
|
||||||
|
Reference in New Issue
Block a user