get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 112084,
    "url": "http://patchwork.dpdk.org/api/patches/112084/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/498d847636038e5512a6b4632df4c8de22f1f9a1.1653925803.git.gmuthukrishn@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<498d847636038e5512a6b4632df4c8de22f1f9a1.1653925803.git.gmuthukrishn@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/498d847636038e5512a6b4632df4c8de22f1f9a1.1653925803.git.gmuthukrishn@marvell.com",
    "date": "2022-05-30T15:52:40",
    "name": "[v9,06/10] examples/fips_validation: add json to hmac",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "553c151069abbf3c16fee8c0fa86aa218d5436f5",
    "submitter": {
        "id": 2301,
        "url": "http://patchwork.dpdk.org/api/people/2301/?format=api",
        "name": "Gowrishankar Muthukrishnan",
        "email": "gmuthukrishn@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/498d847636038e5512a6b4632df4c8de22f1f9a1.1653925803.git.gmuthukrishn@marvell.com/mbox/",
    "series": [
        {
            "id": 23249,
            "url": "http://patchwork.dpdk.org/api/series/23249/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=23249",
            "date": "2022-05-30T15:52:34",
            "name": "Add JSON vector set support to fips validation",
            "version": 9,
            "mbox": "http://patchwork.dpdk.org/series/23249/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/112084/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/112084/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 CB1F8A0542;\n\tMon, 30 May 2022 17:53:27 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 09B2241611;\n\tMon, 30 May 2022 17:53:12 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id A203D400D6\n for <dev@dpdk.org>; Mon, 30 May 2022 17:53:10 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 24UCDgLT004646;\n Mon, 30 May 2022 08:53:10 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3gbk8n61ps-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 30 May 2022 08:53:09 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Mon, 30 May 2022 08:53:07 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Mon, 30 May 2022 08:53:07 -0700",
            "from localhost.localdomain (unknown [10.28.34.38])\n by maili.marvell.com (Postfix) with ESMTP id 5B76A3F7081;\n Mon, 30 May 2022 08:53:05 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=C8RbUJ5gLhVbKErQxEAQfZKDPJUIm32JjsdtPUcqYCY=;\n b=SvKRZYhnfXBo5qwJ+2qiJN+5x94klh9vZ0p2O0gTtVcawrS4AhmdgDO0expIhl2vmNxf\n NQn2uAGRCK1MDroBqbl4TfTl8syRsABsVwWms9C2voIK6NselIQLC2fKl3kQPD2HICEG\n epZUy7wGASH7v9V11GaZC3HNHPDvamvTiDVR/LSMTn4Ruw094Vzupike+Ore4UNrquNa\n GA69qu7BVHRgnSa3hgertuf5Z2RTPxdhNk3fLVSfBSNV6eHHELichYGHED8/0b4sJhXK\n C5h5VK53c8Yk/3H5ugPAlOaEo0TOZx+keeq6/JA1UL/emXdkTjJ/Np1+B/gJBNOxE1JE QQ==",
        "From": "Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Fan Zhang <roy.fan.zhang@intel.com>, Brian Dooley\n <brian.dooley@intel.com>, <lylavoie@iol.unh.edu>, Anoob Joseph\n <anoobj@marvell.com>, Archana Muniganti <marchana@marvell.com>, Jerin Jacob\n <jerinj@marvell.com>, Brandon Lo <blo@iol.unh.edu>, \"Gowrishankar\n Muthukrishnan\" <gmuthukrishn@marvell.com>",
        "Subject": "[v9, 06/10] examples/fips_validation: add json to hmac",
        "Date": "Mon, 30 May 2022 21:22:40 +0530",
        "Message-ID": "\n <498d847636038e5512a6b4632df4c8de22f1f9a1.1653925803.git.gmuthukrishn@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<cover.1653925803.git.gmuthukrishn@marvell.com>",
        "References": "<cover.1653925803.git.gmuthukrishn@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "oqTl2-oqK5VvBa7so5wA9XqomOZp_q6Y",
        "X-Proofpoint-GUID": "oqTl2-oqK5VvBa7so5wA9XqomOZp_q6Y",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514\n definitions=2022-05-30_07,2022-05-30_01,2022-02-23_01",
        "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": "From: Brandon Lo <blo@iol.unh.edu>\n\nAdds JSON support for the HMAC algorithm.\n\nSigned-off-by: Brandon Lo <blo@iol.unh.edu>\nAcked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>\n---\n examples/fips_validation/fips_validation.c    |  2 +\n examples/fips_validation/fips_validation.h    |  6 ++\n .../fips_validation/fips_validation_hmac.c    | 93 +++++++++++++++++++\n examples/fips_validation/main.c               |  3 +\n 4 files changed, 104 insertions(+)",
    "diff": "diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c\nindex 6594a15579..e8520f59cf 100644\n--- a/examples/fips_validation/fips_validation.c\n+++ b/examples/fips_validation/fips_validation.c\n@@ -458,6 +458,8 @@ fips_test_parse_one_json_vector_set(void)\n \t/* Vector sets contain the algorithm type, and nothing else we need. */\n \tif (strstr(algo_str, \"AES-GCM\"))\n \t\tinfo.algo = FIPS_TEST_ALGO_AES_GCM;\n+\tif (strstr(algo_str, \"HMAC\"))\n+\t\tinfo.algo = FIPS_TEST_ALGO_HMAC;\n \telse\n \t\treturn -EINVAL;\n \ndiff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h\nindex 8b9d528c53..3b3ffb7fa6 100644\n--- a/examples/fips_validation/fips_validation.h\n+++ b/examples/fips_validation/fips_validation.h\n@@ -253,6 +253,12 @@ fips_test_parse_one_json_case(void);\n \n int\n parse_test_gcm_json_init(void);\n+\n+int\n+parse_test_hmac_json_init(void);\n+\n+int\n+parse_test_hmac_json_algorithm(void);\n #endif /* RTE_HAS_JANSSON */\n \n int\ndiff --git a/examples/fips_validation/fips_validation_hmac.c b/examples/fips_validation/fips_validation_hmac.c\nindex 1285c9d283..4cd1b1ac07 100644\n--- a/examples/fips_validation/fips_validation_hmac.c\n+++ b/examples/fips_validation/fips_validation_hmac.c\n@@ -19,6 +19,15 @@\n #define PT_STR\t\t\"Msg = \"\n #define TAG_STR\t\t\"Mac = \"\n \n+#define ALGO_JSON_STR\t\"algorithm\"\n+\n+#define KEYLEN_JSON_STR\t\"keyLen\"\n+#define TAGLEN_JSON_STR\t\"macLen\"\n+\n+#define KEY_JSON_STR\t\"key\"\n+#define PT_JSON_STR\t\t\"msg\"\n+#define TAG_JSON_STR\t\"mac\"\n+\n struct hash_size_conversion {\n \tconst char *str;\n \tenum rte_crypto_auth_algorithm algo;\n@@ -65,6 +74,29 @@ struct fips_test_callback hmac_tests_interim_vectors[] = {\n \t\t{NULL, NULL, NULL} /**< end pointer */\n };\n \n+#ifdef RTE_HAS_JANSSON\n+struct hash_size_conversion json_algorithms[] = {\n+\t\t{\"HMAC-SHA-1\", RTE_CRYPTO_AUTH_SHA1_HMAC},\n+\t\t{\"HMAC-SHA2-224\", RTE_CRYPTO_AUTH_SHA224_HMAC},\n+\t\t{\"HMAC-SHA2-256\", RTE_CRYPTO_AUTH_SHA256_HMAC},\n+\t\t{\"HMAC-SHA2-384\", RTE_CRYPTO_AUTH_SHA384_HMAC},\n+\t\t{\"HMAC-SHA2-512\", RTE_CRYPTO_AUTH_SHA512_HMAC},\n+};\n+\n+struct fips_test_callback hmac_tests_json_vectors[] = {\n+\t\t{KEY_JSON_STR, parse_uint8_hex_str, &vec.cipher_auth.key},\n+\t\t{PT_JSON_STR, parse_uint8_hex_str, &vec.pt},\n+\t\t{TAG_JSON_STR, parse_uint8_hex_str, &vec.cipher_auth.digest},\n+\t\t{NULL, NULL, NULL} /**< end pointer */\n+};\n+\n+struct fips_test_callback hmac_tests_interim_json_vectors[] = {\n+\t\t{KEYLEN_JSON_STR, parser_read_uint32_val, &vec.cipher_auth.key},\n+\t\t{TAGLEN_JSON_STR, parser_read_uint32_bit_val, &vec.cipher_auth.digest},\n+\t\t{NULL, NULL, NULL} /**< end pointer */\n+};\n+#endif /* RTE_HAS_JANSSON */\n+\n static int\n parse_test_hmac_writeback(struct fips_val *val)\n {\n@@ -103,3 +135,64 @@ parse_test_hmac_init(void)\n \n \treturn 0;\n }\n+\n+#ifdef RTE_HAS_JANSSON\n+static int\n+parse_test_hmac_json_writeback(struct fips_val *val)\n+{\n+\tstruct fips_val val_local;\n+\tjson_t *tcId, *mac;\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+\n+\tval_local.val = val->val + vec.pt.len;\n+\tval_local.len = vec.cipher_auth.digest.len;\n+\n+\twriteback_hex_str(\"\", info.one_line_text, &val_local);\n+\n+\tmac = json_string(info.one_line_text);\n+\tjson_object_set_new(json_info.json_write_case, TAG_JSON_STR, mac);\n+\n+\treturn 0;\n+}\n+\n+int\n+parse_test_hmac_json_algorithm(void)\n+{\n+\tjson_t *algorithm_object;\n+\tconst char *algorithm_str;\n+\tuint32_t i;\n+\n+\talgorithm_object = json_object_get(json_info.json_vector_set, \"algorithm\");\n+\talgorithm_str = json_string_value(algorithm_object);\n+\n+\tfor (i = 0; i < RTE_DIM(json_algorithms); i++) {\n+\t\tif (strstr(algorithm_str, json_algorithms[i].str)) {\n+\t\t\tinfo.interim_info.hmac_data.algo = json_algorithms[i].algo;\n+\t\t\treturn 0;\n+\t\t}\n+\t}\n+\n+\treturn -1;\n+}\n+\n+int\n+parse_test_hmac_json_init(void)\n+{\n+\tinfo.op = FIPS_TEST_ENC_AUTH_GEN;\n+\tinfo.parse_writeback = parse_test_hmac_json_writeback;\n+\tinfo.callbacks = hmac_tests_json_vectors;\n+\tinfo.writeback_callbacks = NULL;\n+\tinfo.kat_check = rsp_test_hmac_check;\n+\tinfo.interim_callbacks = hmac_tests_interim_json_vectors;\n+\n+\tif (parse_test_hmac_json_algorithm() < 0)\n+\t\treturn -1;\n+\n+\treturn 0;\n+}\n+#endif /* RTE_HAS_JANSSON */\ndiff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c\nindex e729b01529..2393559d0d 100644\n--- a/examples/fips_validation/main.c\n+++ b/examples/fips_validation/main.c\n@@ -1957,6 +1957,9 @@ fips_test_one_test_group(void)\n \tcase FIPS_TEST_ALGO_AES_GCM:\n \t\tret = parse_test_gcm_json_init();\n \t\tbreak;\n+\tcase FIPS_TEST_ALGO_HMAC:\n+\t\tret = parse_test_hmac_json_init();\n+\t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\n \t}\n",
    "prefixes": [
        "v9",
        "06/10"
    ]
}