diff options
author | Dave Airlie <airlied@redhat.com> | 2014-11-04 10:17:02 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-11-04 10:17:02 +1000 |
commit | 7a3f1398e6715dfc47cf0d5961b54ba396db18aa (patch) | |
tree | 80ef36f9377858ea412987f6074b0371d849ac80 | |
parent | 592826e5fb6383bc264cde0e68ed3997615e5462 (diff) |
pass Rtx to AKE init
-rw-r--r-- | dl3.c | 4 | ||||
-rw-r--r-- | dl3_hdcp.c | 5 | ||||
-rw-r--r-- | dl_pkts.h | 3 |
3 files changed, 6 insertions, 6 deletions
@@ -28,6 +28,8 @@ static int PID = 0x4301; static unsigned char mykm[16] = { 0xcd, 0xef, 0x65, 0x33, 0x69, 0x23, 0xfa, 0x3e, 0x60, 0xee, 0xdd, 0x5c, 0xce, 0xfb, 0x39, 0x19 }; +const uint8_t Rtx[] = { 0x84, 0xd7, 0xcf, 0x64, 0x2d, 0x68, 0xff, 0xd5 }; + static int create_gcrypt_pubkey(struct hdcp_session_info *info, const uint8_t *n, const uint8_t *e, @@ -280,7 +282,7 @@ static int send_buffer(libusb_device_handle *handle, int endpoint_out, int endpo memset(buf, 0, 1024); dl3_msg2_hdr04(buf, &len); len2 = len; - dl3_packet_hdcp_ake_init(&buf[len], &len); + dl3_packet_hdcp_ake_init(&buf[len], &len, Rtx); len2 += len; len2 = ROUND_TO_4(len2); r = write_to_usb(handle, endpoint_out, buf, len2, &size); @@ -93,8 +93,6 @@ void dl3_msg2_hdr04(uint8_t *buf, int *len_p) *len_p = len + 4; } -static const uint8_t Rtx[] = { 0x84, 0xd7, 0xcf, 0x64, 0x2d, 0x68, 0xff, 0xd5 }; - void dl3_msg4_hdr4(uint8_t *buf, uint16_t length, uint16_t type, uint16_t seq) { buf[16] = (length & 0xff); @@ -114,7 +112,8 @@ int pkt4_mid_len(int hdcp_msg_len, int *mid_len) total += 14; return total; } -void dl3_packet_hdcp_ake_init(uint8_t *buf, int *len_p) + +void dl3_packet_hdcp_ake_init(uint8_t *buf, int *len_p, uint8_t *Rtx) { int ake_init_len = 8 + 1; int total_len = 0; @@ -5,8 +5,7 @@ void dl3_empty_packet(uint8_t *buf, int *len); void dl3_msg2_hdr25(uint8_t *buf, int *len_p); void dl3_msg2_hdr04(uint8_t *buf, int *len_p); -void dl3_packet_hdcp_ake_init(uint8_t *buf, int *len_p); - +void dl3_packet_hdcp_ake_init(uint8_t *buf, int *len_p, uint8_t *Rtx); void dl3_packet_hdcp_ake_no_stored_km(uint8_t *buf, int *len_p, uint8_t *ekpubkm); #define ROUND_TO_4(x) ((((x) + 3) / 4) * 4) #endif |