get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/106612/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 106612,
    "url": "http://patches.dpdk.org/api/patches/106612/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220127145142.86742-6-blo@iol.unh.edu/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220127145142.86742-6-blo@iol.unh.edu>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220127145142.86742-6-blo@iol.unh.edu",
    "date": "2022-01-27T14:51:42",
    "name": "[5/5] examples/fips_validation: add json to gcm test",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "de1f7b4efd7fe61bffd8b133b8f9e6528df4a0ee",
    "submitter": {
        "id": 1678,
        "url": "http://patches.dpdk.org/api/people/1678/?format=api",
        "name": "Brandon Lo",
        "email": "blo@iol.unh.edu"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220127145142.86742-6-blo@iol.unh.edu/mbox/",
    "series": [
        {
            "id": 21400,
            "url": "http://patches.dpdk.org/api/series/21400/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21400",
            "date": "2022-01-27T14:51:37",
            "name": "Add JSON vector set support to fips validation",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/21400/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/106612/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/106612/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EE5BFA04A6;\n\tThu, 27 Jan 2022 15:52:22 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DABD742830;\n\tThu, 27 Jan 2022 15:51:53 +0100 (CET)",
            "from mail-qk1-f181.google.com (mail-qk1-f181.google.com\n [209.85.222.181])\n by mails.dpdk.org (Postfix) with ESMTP id DF8C742813\n for <dev@dpdk.org>; Thu, 27 Jan 2022 15:51:50 +0100 (CET)",
            "by mail-qk1-f181.google.com with SMTP id o10so2833437qkg.0\n for <dev@dpdk.org>; Thu, 27 Jan 2022 06:51:50 -0800 (PST)",
            "from blo.iol.unh.edu ([2606:4100:3880:1270:8f3:b5b9:6ccc:8a5c])\n by smtp.gmail.com with ESMTPSA id 195sm1507324qkf.30.2022.01.27.06.51.49\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 27 Jan 2022 06:51:49 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu;\n s=unh-iol;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=knO9ZofTXTekSQS12//DUOk0MLH+na3txgS57wnEIns=;\n b=U74Tcgn4U1FdNQpFcewrA2TMkqjNrv9jKKRM5ww9HTv6ov//dUSzD2LpAqWyUsRQ9Z\n uhl5nkQ5LHNYGi17nTN7OxFblzf/TfexcwD9VZ+vDf5Fca66lqq8Vbys7lgq9jHTyaWx\n l2Hsc8nwslQWjqBbWj82CR6MCR0Sd2tEmP5/o=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=knO9ZofTXTekSQS12//DUOk0MLH+na3txgS57wnEIns=;\n b=nd+ZCH26CoaiTh208+O9ok1MNulijGljUscri+TSn6ngaoLclHGkMxphKBRJ1eXNra\n nbmi98HUK9dP0NnR+7O2Qa1IPfnD9pI42FzPiRn2DyGzpAwF+fVr0VjjisZl8w7Lx+e1\n r+xsjhm1d16lLrNodqVsciBfnYJWPPClEf3F5beA3fMakw6au5B8u6meofWdF5URwoRn\n wBTECzK6BkjgoqcnupBugPd5iQ6xCd8yQH6Wc/vAm5gxM3xPl5fE7ZXJKD9Lf/ky1kCp\n QPtZ4jpd0O20rWpNm50rJagiUjVzwqIcNWNcTBbKJQr3sA4EER6hpeqHEqLIjzf1jqju\n iVIQ==",
        "X-Gm-Message-State": "AOAM530a0pLz2RGEEdk7SGjnMLPtrnOPm54Y/8V+N0bNbMWkJO2+kEv1\n XueLVZTndKgs3ZqPBwaFrEDk4Nwp7CvisDIcuXiMG4EPHXFwZ3CIz+NPbvJEsQl+m4fIeGP5n57\n sGgh9AV6m1R54q36ji+OnIAqEuLTPN8/MQ7CGhpQLdMvlEFvI4zU=",
        "X-Google-Smtp-Source": "\n ABdhPJyWuOZ+OPwholoS3pOTQ37VlH+jyEIiikt6Rvm76y+gzH6tRkKNYfPuq3/1jHvVye+7Wl2nSA==",
        "X-Received": "by 2002:ae9:e50d:: with SMTP id w13mr2762412qkf.404.1643295110063;\n Thu, 27 Jan 2022 06:51:50 -0800 (PST)",
        "From": "Brandon Lo <blo@iol.unh.edu>",
        "To": "dev@dpdk.org",
        "Cc": "ciara.power@intel.com, roy.fan.zhang@intel.com,\n Brandon Lo <blo@iol.unh.edu>",
        "Subject": "[PATCH 5/5] examples/fips_validation: add json to gcm test",
        "Date": "Thu, 27 Jan 2022 09:51:42 -0500",
        "Message-Id": "<20220127145142.86742-6-blo@iol.unh.edu>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220127145142.86742-1-blo@iol.unh.edu>",
        "References": "<20220127145142.86742-1-blo@iol.unh.edu>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Adds json-specific testing and writeback function. Allows\nthe user to test AES-GCM vector sets.\n\nSigned-off-by: Brandon Lo <blo@iol.unh.edu>\n---\n .../fips_validation/fips_validation_gcm.c     | 149 ++++++++++++++++++\n 1 file changed, 149 insertions(+)",
    "diff": "diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c\nindex 250d09bf90..4df20370b6 100644\n--- a/examples/fips_validation/fips_validation_gcm.c\n+++ b/examples/fips_validation/fips_validation_gcm.c\n@@ -6,6 +6,10 @@\n #include <time.h>\n #include <stdio.h>\n \n+#ifdef RTE_HAS_JANSSON\n+#include <jansson.h>\n+#endif /* RTE_HAS_JANSSON */\n+\n #include <rte_cryptodev.h>\n #include <rte_malloc.h>\n \n@@ -37,6 +41,27 @@\n #define OP_ENC_EXT_STR\t\"ExtIV\"\n #define OP_ENC_INT_STR\t\"IntIV\"\n \n+#define KEYLEN_JSON_STR\t\t\"keyLen\"\n+#define IVLEN_JSON_STR\t\t\"ivLen\"\n+#define PAYLOADLEN_JSON_STR\t\"payloadLen\"\n+#define AADLEN_JSON_STR\t\t\"aadLen\"\n+#define TAGLEN_JSON_STR\t\t\"tagLen\"\n+\n+#define KEY_JSON_STR\t\"key\"\n+#define IV_JSON_STR\t\t\"iv\"\n+#define PT_JSON_STR\t\t\"pt\"\n+#define CT_JSON_STR\t\t\"ct\"\n+#define AAD_JSON_STR\t\"aad\"\n+#define TAG_JSON_STR\t\"tag\"\n+#define DIR_JSON_STR \t\"direction\"\n+\n+#define OP_ENC_JSON_STR\t\"encrypt\"\n+#define OP_DEC_JSON_STR\t\"decrypt\"\n+\n+#define IVGEN_JSON_STR\t\"ivGen\"\n+#define OP_ENC_EXT_JSON_STR\t\"external\"\n+#define OP_ENC_INT_JSON_STR\t\"internal\"\n+\n #define NEG_TEST_STR\t\"FAIL\"\n \n /**\n@@ -136,6 +161,40 @@ struct fips_test_callback gcm_enc_vectors[] = {\n \t\t{NULL, NULL, NULL} /**< end pointer */\n };\n \n+#ifdef RTE_HAS_JANSSON\n+struct fips_test_callback gcm_dec_json_vectors[] = {\n+\t\t{KEY_JSON_STR, parse_uint8_known_len_hex_str, &vec.aead.key},\n+\t\t{IV_JSON_STR, parse_uint8_known_len_hex_str, &vec.iv},\n+\t\t{CT_JSON_STR, parse_gcm_pt_ct_str, &vec.ct},\n+\t\t{AAD_JSON_STR, parse_gcm_aad_str, &vec.aead.aad},\n+\t\t{TAG_JSON_STR, parse_uint8_known_len_hex_str,\n+\t\t\t\t&vec.aead.digest},\n+\t\t{NULL, NULL, NULL} /**< end pointer */\n+};\n+\n+struct fips_test_callback gcm_interim_json_vectors[] = {\n+\t\t{KEYLEN_JSON_STR, parser_read_uint32_bit_val, &vec.aead.key},\n+\t\t{IVLEN_JSON_STR, parser_read_uint32_bit_val, &vec.iv},\n+\t\t{PAYLOADLEN_JSON_STR, parser_read_gcm_pt_len, &vec.pt},\n+\t\t{PAYLOADLEN_JSON_STR, parser_read_uint32_bit_val, &vec.ct},\n+\t\t/**< The NIST json test vectors use 'payloadLen' to denote input text\n+\t\t *  length in case of decrypt & encrypt operations.\n+\t\t */\n+\t\t{AADLEN_JSON_STR, parser_read_uint32_bit_val, &vec.aead.aad},\n+\t\t{TAGLEN_JSON_STR, parser_read_uint32_bit_val,\n+\t\t\t\t&vec.aead.digest},\n+\t\t{NULL, NULL, NULL} /**< end pointer */\n+};\n+\n+struct fips_test_callback gcm_enc_json_vectors[] = {\n+\t\t{KEY_JSON_STR, parse_uint8_known_len_hex_str, &vec.aead.key},\n+\t\t{IV_JSON_STR, parse_uint8_known_len_hex_str, &vec.iv},\n+\t\t{PT_JSON_STR, parse_gcm_pt_ct_str, &vec.pt},\n+\t\t{AAD_JSON_STR, parse_gcm_aad_str, &vec.aead.aad},\n+\t\t{NULL, NULL, NULL} /**< end pointer */\n+};\n+#endif /* RTE_HAS_JANSSON */\n+\n static int\n parse_test_gcm_writeback(struct fips_val *val)\n {\n@@ -188,12 +247,102 @@ parse_test_gcm_writeback(struct fips_val *val)\n \treturn 0;\n }\n \n+#ifdef RTE_HAS_JANSSON\n+static int\n+parse_test_gcm_json_writeback(struct fips_val *val)\n+{\n+\tstruct fips_val tmp_val;\n+\tjson_t *tcId, *tag;\n+\n+\ttcId = json_object_get(json_info.json_test_case, \"tcId\");\n+\n+\tjson_info.json_write_case = json_object();\n+\tjson_object_set(json_info.json_write_case, \"tcId\", tcId);\n+\n+\tif (info.op == FIPS_TEST_ENC_AUTH_GEN) {\n+\t\tjson_t *ct;\n+\n+\t\ttmp_val.val = val->val;\n+\t\ttmp_val.len = vec.pt.len;\n+\n+\t\twriteback_hex_str(\"\", info.one_line_text, &tmp_val);\n+\t\tct = json_string(info.one_line_text);\n+\t\tjson_object_set_new(json_info.json_write_case, CT_JSON_STR, ct);\n+\n+\t\tif (info.interim_info.gcm_data.gen_iv) {\n+\t\t\tjson_t *iv;\n+\t\t\ttmp_val.val = vec.iv.val;\n+\t\t\ttmp_val.len = vec.iv.len;\n+\n+\t\t\twriteback_hex_str(\"\", info.one_line_text, &tmp_val);\n+\t\t\tiv = json_string(info.one_line_text);\n+\t\t\tjson_object_set_new(json_info.json_write_case, IV_JSON_STR, iv);\n+\n+\t\t\trte_free(vec.iv.val);\n+\t\t\tvec.iv.val = NULL;\n+\t\t}\n+\n+\t\ttmp_val.val = val->val + vec.pt.len;\n+\t\ttmp_val.len = val->len - vec.pt.len;\n+\n+\t\twriteback_hex_str(\"\", info.one_line_text, &tmp_val);\n+\t\ttag = json_string(info.one_line_text);\n+\t\tjson_object_set_new(json_info.json_write_case, TAG_JSON_STR, tag);\n+\t} else {\n+\t\tif (vec.status == RTE_CRYPTO_OP_STATUS_SUCCESS) {\n+\t\t\tif (!info.interim_info.gcm_data.is_gmac) {\n+\t\t\t\ttmp_val.val = val->val;\n+\t\t\t\ttmp_val.len = vec.pt.len;\n+\n+\t\t\t\twriteback_hex_str(\"\", info.one_line_text, &tmp_val);\n+\t\t\t\tjson_object_set_new(json_info.json_write_case, PT_JSON_STR,\n+\t\t\t\t\tjson_string(info.one_line_text));\n+\t\t\t}\n+\t\t} else {\n+\t\t\tjson_object_set_new(json_info.json_write_case, \"testPassed\", json_false());\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+#endif /* RTE_HAS_JANSSON */\n+\n int\n parse_test_gcm_init(void)\n {\n \tchar *tmp;\n \tuint32_t i;\n \n+#ifdef RTE_HAS_JANSSON\n+\tif (json_info.json_test_group) {\n+\t\tjson_t *direction_obj;\n+\t\tconst char *direction_str;\n+\n+\t\tdirection_obj = json_object_get(json_info.json_test_group, DIR_JSON_STR);\n+\t\tdirection_str = json_string_value(direction_obj);\n+\n+\t\tif (strcmp(direction_str, OP_ENC_JSON_STR) == 0) {\n+\t\t\tjson_t *ivGen_obj = json_object_get(json_info.json_test_group, IVGEN_JSON_STR);\n+\t\t\tconst char *ivGen_str = json_string_value(ivGen_obj);\n+\n+\t\t\tinfo.op = FIPS_TEST_ENC_AUTH_GEN;\n+\t\t\tinfo.callbacks = gcm_enc_json_vectors;\n+\n+\t\t\tif (strcmp(ivGen_str, OP_ENC_INT_JSON_STR) == 0) {\n+\t\t\t\tinfo.interim_info.gcm_data.gen_iv = 1;\n+\t\t\t}\n+\t\t} else if (strcmp(direction_str, OP_DEC_JSON_STR) == 0) {\n+\t\t\tinfo.op = FIPS_TEST_DEC_AUTH_VERIF;\n+\t\t\tinfo.callbacks = gcm_dec_json_vectors;\n+\t\t} else {\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t\tinfo.interim_callbacks = gcm_interim_json_vectors;\n+\t\tinfo.parse_writeback = parse_test_gcm_json_writeback;\n+\n+\t\treturn 0;\n+\t}\n+#endif /* RTE_HAS_JANSSON */\n \n \tfor (i = 0; i < info.nb_vec_lines; i++) {\n \t\tchar *line = info.vec[i];\n",
    "prefixes": [
        "5/5"
    ]
}