get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 110524,
    "url": "http://patches.dpdk.org/api/patches/110524/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220429161559.415645-8-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": "<20220429161559.415645-8-blo@iol.unh.edu>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220429161559.415645-8-blo@iol.unh.edu",
    "date": "2022-04-29T16:15:58",
    "name": "[v4,7/8] examples/fips_validation: implement json cmac test",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "893f411902c04dc5be1173cfebec9768d31118d2",
    "submitter": {
        "id": 1678,
        "url": "http://patches.dpdk.org/api/people/1678/?format=api",
        "name": "Brandon Lo",
        "email": "blo@iol.unh.edu"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220429161559.415645-8-blo@iol.unh.edu/mbox/",
    "series": [
        {
            "id": 22738,
            "url": "http://patches.dpdk.org/api/series/22738/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22738",
            "date": "2022-04-29T16:15:51",
            "name": "Add JSON vector set support to fips validation",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/22738/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/110524/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/110524/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 7CB85A04FF;\n\tFri, 29 Apr 2022 18:16:49 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D738C42840;\n\tFri, 29 Apr 2022 18:16:12 +0200 (CEST)",
            "from mail-qt1-f177.google.com (mail-qt1-f177.google.com\n [209.85.160.177])\n by mails.dpdk.org (Postfix) with ESMTP id 4895042833\n for <dev@dpdk.org>; Fri, 29 Apr 2022 18:16:09 +0200 (CEST)",
            "by mail-qt1-f177.google.com with SMTP id p4so5557626qtq.12\n for <dev@dpdk.org>; Fri, 29 Apr 2022 09:16:09 -0700 (PDT)",
            "from blo.iol.unh.edu ([2606:4100:3880:1270:ec49:26fa:daa6:229d])\n by smtp.gmail.com with ESMTPSA id\n k20-20020a05622a03d400b002ec16d2694fsm2081188qtx.39.2022.04.29.09.16.08\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 29 Apr 2022 09:16:08 -0700 (PDT)"
        ],
        "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=VUc7jsRduw3fVhSRbhtDqzGMDIQR76TpPoxasjK1OB8=;\n b=M4qslR2zPlySqyAhx/MlX+TGGqigQlsW7/2sqxQEh2V3AtwaW84n+6jkxeQvuLGH/Q\n 9vtKfpi43LtfYIc/dmkuMZ6LojQfmPFYCT+WsfbgkBhwBowOyiRBYXWU0f+iZHgp7XAp\n 7uGElhJ4z56XHE4LTKaI0OvLajP2dOG0t65fY=",
        "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=VUc7jsRduw3fVhSRbhtDqzGMDIQR76TpPoxasjK1OB8=;\n b=I4Q5YGHY+iNpIJ68UeQ3Pf1kL/19PTIQjNAw2bwSMcdJmOFUghroX8h1wtH/tnSg30\n qtgxs6EVAJdnprPpftUKmF0eY2YVXZJAj7EvSd6Xv6kU85N+bYLuglFzT3bh4yFD3G57\n cnybYopySpxriHioIVYKRYi6wsegJwRqKNmA1VBujlOJPC9gBnb3pZZYIzLP5ZEiGGNB\n ClqkEJLjdVZIFlCDLwyqXQKW+NvpgeiZHY9P9ywcA6pekXN2/7YnCWl5tVI4db7jKEPp\n RgNbB1lkVVv1ymzwCIZwOrvYex+lCD1L4Avk1GWrotM/ScubDFQ4gx/aveQ3GiRZ33YL\n 8ALQ==",
        "X-Gm-Message-State": "AOAM530wVtdzl1NLI64qTvY14OCilm8Oz7YHnSrWmJgp5wsmcsgyGddr\n hNFnbH5ZpvBeTYEUiksbswgGBQ==",
        "X-Google-Smtp-Source": "\n ABdhPJzAg4d5DmfnvFmyPh/CxCsyW42GEbrA76ztauwkoD4IHKFShyPOFahBK3aRJRn8K8jUYdxYYg==",
        "X-Received": "by 2002:ac8:7e94:0:b0:2f3:7e38:ef88 with SMTP id\n w20-20020ac87e94000000b002f37e38ef88mr165697qtj.280.1651248968720;\n Fri, 29 Apr 2022 09:16:08 -0700 (PDT)",
        "From": "Brandon Lo <blo@iol.unh.edu>",
        "To": "roy.fan.zhang@intel.com,\n\tciara.power@intel.com",
        "Cc": "dev@dpdk.org,\n\tBrandon Lo <blo@iol.unh.edu>",
        "Subject": "[PATCH v4 7/8] examples/fips_validation: implement json cmac test",
        "Date": "Fri, 29 Apr 2022 12:15:58 -0400",
        "Message-Id": "<20220429161559.415645-8-blo@iol.unh.edu>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220429161559.415645-1-blo@iol.unh.edu>",
        "References": "<20220129175514.746925-1-blo@iol.unh.edu>\n <20220429161559.415645-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": "Implemented JSON support for the CMAC test.\n\nSigned-off-by: Brandon Lo <blo@iol.unh.edu>\n---\n examples/fips_validation/fips_validation.h    |  6 ++\n .../fips_validation/fips_validation_cmac.c    | 68 +++++++++++++++++++\n 2 files changed, 74 insertions(+)",
    "diff": "diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h\nindex 2c65d838b0..7f68d454f7 100644\n--- a/examples/fips_validation/fips_validation.h\n+++ b/examples/fips_validation/fips_validation.h\n@@ -259,6 +259,12 @@ parse_test_hmac_json_init(void);\n \n int\n parse_test_hmac_json_algorithm(void);\n+\n+int\n+parse_test_cmac_json_init(void);\n+\n+int\n+parser_read_cmac_direction_str(const char *key, char *src, struct fips_val *val);\n #endif /* RTE_HAS_JANSSON */\n \n int\ndiff --git a/examples/fips_validation/fips_validation_cmac.c b/examples/fips_validation/fips_validation_cmac.c\nindex 54c951ef83..4b5fd2aca7 100644\n--- a/examples/fips_validation/fips_validation_cmac.c\n+++ b/examples/fips_validation/fips_validation_cmac.c\n@@ -32,6 +32,18 @@\n #define PASS_STR\t\"P\"\n #define FAIL_STR\t\"F\"\n \n+#define KLEN_JSON_STR\t\t\"keyLen\"\n+#define PTLEN_JSON_STR\t\t\"msgLen\"\n+#define TAGLEN_JSON_STR\t\t\"macLen\"\n+#define KEY_JSON_STR\t\t\"key\"\n+#define PT_JSON_STR\t\t\t\"message\"\n+#define TAG_JSON_STR\t\t\"mac\"\n+#define DIRECTION_JSON_STR\t\"direction\"\n+#define POS_NEG_JSON_STR\t\"testPassed\"\n+\n+#define GEN_JSON_STR\t\"gen\"\n+#define VERIF_JSON_STR\t\"ver\"\n+\n struct hash_algo_conversion {\n \tconst char *str;\n \tenum fips_test_algorithms algo;\n@@ -39,6 +51,62 @@ struct hash_algo_conversion {\n \t\t{\"AES\", FIPS_TEST_ALGO_AES_CMAC},\n };\n \n+#ifdef RTE_HAS_JANSSON\n+struct fips_test_callback cmac_tests_interim_json_vectors[] = {\n+\t\t{KLEN_JSON_STR, parser_read_uint32_bit_val, &vec.cipher_auth.key},\n+\t\t{PTLEN_JSON_STR, parser_read_uint32_bit_val, &vec.pt},\n+\t\t{TAGLEN_JSON_STR, parser_read_uint32_bit_val, &vec.cipher_auth.digest},\n+\t\t{DIRECTION_JSON_STR, parser_read_cmac_direction_str, NULL},\n+\t\t{NULL, NULL, NULL} /**< end pointer */\n+};\n+\n+struct fips_test_callback cmac_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_known_len_hex_str, &vec.pt},\n+\t\t{TAG_JSON_STR, parse_uint8_known_len_hex_str,\n+\t\t\t\t&vec.cipher_auth.digest},\n+\t\t{NULL, NULL, NULL} /**< end pointer */\n+};\n+\n+static int\n+parse_test_cmac_json_writeback(struct fips_val *val)\n+{\n+\tjson_info.json_write_case = json_object();\n+\tjson_object_set(json_info.json_write_case, \"tcId\",\n+\t\tjson_object_get(json_info.json_test_case, \"tcId\"));\n+\n+\tif (info.op == FIPS_TEST_ENC_AUTH_GEN) {\n+\t\tstruct fips_val tmp_val = {val->val + vec.pt.len,\n+\t\t\t\tvec.cipher_auth.digest.len};\n+\n+\t\twriteback_hex_str(\"\", info.one_line_text, &tmp_val);\n+\t\tjson_object_set_new(json_info.json_write_case, TAG_JSON_STR,\n+\t\t\tjson_string(info.one_line_text));\n+\t} else {\n+\t\tif (vec.status == RTE_CRYPTO_OP_STATUS_SUCCESS)\n+\t\t\tjson_object_set_new(json_info.json_write_case, POS_NEG_JSON_STR,\n+\t\t\t\tjson_boolean(true));\n+\t\telse if (vec.status == RTE_CRYPTO_OP_STATUS_AUTH_FAILED)\n+\t\t\tjson_object_set_new(json_info.json_write_case, POS_NEG_JSON_STR,\n+\t\t\t\tjson_boolean(false));\n+\t}\n+\n+\treturn 0;\n+}\n+\n+int\n+parse_test_cmac_json_init(void)\n+{\n+\tinfo.algo = FIPS_TEST_ALGO_AES_CMAC;\n+\n+\tinfo.parse_writeback = parse_test_cmac_json_writeback;\n+\tinfo.callbacks = cmac_tests_json_vectors;\n+\tinfo.interim_callbacks = cmac_tests_interim_json_vectors;\n+\n+\treturn 0;\n+}\n+#endif /* RTE_HAS_JANSSON */\n+\n static int\n parse_test_cmac_writeback(struct fips_val *val)\n {\n",
    "prefixes": [
        "v4",
        "7/8"
    ]
}