Don't check oid's too closely, they change in Windows Vista.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16087 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -1481,13 +1481,13 @@ pk_rd_pa_reply_enckey(krb5_context context, | |||||||
| 	goto out; | 	goto out; | ||||||
|  |  | ||||||
|    |    | ||||||
|     /* verify content type */ |     /*  | ||||||
|     if (type == COMPAT_WIN2K) { |      * Try to verify content type. We can't do this for W2K case | ||||||
| 	if (heim_oid_cmp(&ed.encryptedContentInfo.contentType, oid_id_pkcs7_data())) { |      * because W2K/W2K3 sends id-pkcs7-data, but Windows Vista sends | ||||||
| 	    ret = KRB5KRB_AP_ERR_MSG_TYPE; |      * id-pkcs7-signedData to all versions, even W2K clients. | ||||||
| 	    goto out; |      */ | ||||||
| 	} |  | ||||||
|     } else { |     if (type != COMPAT_WIN2K) { | ||||||
| 	if (heim_oid_cmp(&ed.encryptedContentInfo.contentType, oid_id_pkcs7_signedData())) { | 	if (heim_oid_cmp(&ed.encryptedContentInfo.contentType, oid_id_pkcs7_signedData())) { | ||||||
| 	    ret = KRB5KRB_AP_ERR_MSG_TYPE; | 	    ret = KRB5KRB_AP_ERR_MSG_TYPE; | ||||||
| 	    goto out; | 	    goto out; | ||||||
| @@ -1582,6 +1582,7 @@ pk_rd_pa_reply_enckey(krb5_context context, | |||||||
| 	goto out; | 	goto out; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | #if 0 | ||||||
|     if (type == COMPAT_WIN2K) { |     if (type == COMPAT_WIN2K) { | ||||||
| 	if (heim_oid_cmp(&contentType, oid_id_pkcs7_data()) != 0) { | 	if (heim_oid_cmp(&contentType, oid_id_pkcs7_data()) != 0) { | ||||||
| 	    krb5_set_error_string(context, "PKINIT: reply key, wrong oid"); | 	    krb5_set_error_string(context, "PKINIT: reply key, wrong oid"); | ||||||
| @@ -1595,6 +1596,7 @@ pk_rd_pa_reply_enckey(krb5_context context, | |||||||
| 	    goto out; | 	    goto out; | ||||||
| 	} | 	} | ||||||
|     } |     } | ||||||
|  | #endif | ||||||
|  |  | ||||||
|     switch(type) { |     switch(type) { | ||||||
|     case COMPAT_WIN2K: |     case COMPAT_WIN2K: | ||||||
| @@ -1880,6 +1882,7 @@ _krb5_pk_rd_pa_reply(krb5_context context, | |||||||
| 				     &rep19, | 				     &rep19, | ||||||
| 				     &size); | 				     &size); | ||||||
| 	if (ret == 0) { | 	if (ret == 0) { | ||||||
|  | 	    krb5_clear_error_string(context); | ||||||
| 	    switch(rep19.element) { | 	    switch(rep19.element) { | ||||||
| 	    case choice_PA_PK_AS_REP_19_dhSignedData: | 	    case choice_PA_PK_AS_REP_19_dhSignedData: | ||||||
| 		ret = pk_rd_pa_reply_dh(context, &rep19.u.dhSignedData, ctx, | 		ret = pk_rd_pa_reply_dh(context, &rep19.u.dhSignedData, ctx, | ||||||
| @@ -1919,6 +1922,8 @@ _krb5_pk_rd_pa_reply(krb5_context context, | |||||||
| 	    return ret; | 	    return ret; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	krb5_clear_error_string(context); | ||||||
|  | 	 | ||||||
| 	switch (w2krep.element) { | 	switch (w2krep.element) { | ||||||
| 	case choice_PA_PK_AS_REP_Win2k_encKeyPack: | 	case choice_PA_PK_AS_REP_Win2k_encKeyPack: | ||||||
| 	    ret = decode_ContentInfo(w2krep.u.encKeyPack.data, | 	    ret = decode_ContentInfo(w2krep.u.encKeyPack.data, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand