summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-12-01 10:03:39 +1000
committerDave Airlie <airlied@redhat.com>2014-12-01 10:03:39 +1000
commitba37529d2031c907a20c52fe4719516ebbe5ea6d (patch)
treec3701a94606ffdc8114abe0d51a876c4d8309e6a
parentdafc07494540e1bf7d37cc1ec7db23a411a117bd (diff)
run test firstHEADmaster
-rw-r--r--dl3.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/dl3.c b/dl3.c
index 7bca1b6..d345fd2 100644
--- a/dl3.c
+++ b/dl3.c
@@ -573,14 +573,8 @@ static int dump_buffer(struct hdcp_session_info *info,
}
-static int send_buffer(libusb_device_handle *handle, int endpoint_out, int endpoint_in)
+static int test_decode(void)
{
- unsigned char buf[1024];
- int r;
- int count;
- int size;
- int len2, len;
- gcry_sexp_t km, result;
struct hdcp_session_info info;
memset(&info, 0, sizeof(info));
@@ -600,7 +594,25 @@ static int send_buffer(libusb_device_handle *handle, int endpoint_out, int endpo
dump_buffer(&info, mypkt_repl2_data, sizeof(mypkt_repl2_data), 0x15);
}
- return;
+}
+static int send_buffer(libusb_device_handle *handle, int endpoint_out, int endpoint_in)
+{
+ unsigned char buf[1024];
+ int r;
+ int count;
+ int size;
+ int len2, len;
+ gcry_sexp_t km, result;
+ struct hdcp_session_info info;
+
+ memset(&info, 0, sizeof(info));
+
+ EVP_CIPHER_CTX_init(&info.aes_ctx);
+
+ info.rtx = Rtx;
+ info.km = forgekm;
+ info.ks = myks2;
+
// calculate_hacker_key(&info);
// return;
dl3_empty_packet(buf, &len);
@@ -795,6 +807,7 @@ int main(int argc, char** argv)
{
int r;
+ test_decode();
// decode_cert(NULL, dplinkcert, 546);
#if 1
r = libusb_init(NULL);