1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
/* plugins/preauth/pkinit/pkinit_kdf_constants.c */
4
* Copyright (C) 2011 by the Massachusetts Institute of Technology.
7
* Export of this software from the United States of America may
8
* require a specific license from the United States Government.
9
* It is the responsibility of any person or organization contemplating
10
* export to obtain such a license before exporting.
12
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13
* distribute this software and its documentation for any purpose and
14
* without fee is hereby granted, provided that the above copyright
15
* notice appear in all copies and that both that copyright notice and
16
* this permission notice appear in supporting documentation, and that
17
* the name of M.I.T. not be used in advertising or publicity pertaining
18
* to distribution of the software without specific, written prior
19
* permission. Furthermore if you modify this software you must label
20
* your software as modified software and not distribute it in such a
21
* fashion that it might be confused with the original M.I.T. software.
22
* M.I.T. makes no representations about the suitability of
23
* this software for any purpose. It is provided "as is" without express
24
* or implied warranty.
28
* pkinit_kdf_test.c -- Structures and constants for implementation of
29
* pkinit algorithm agility. Includes definitions of algorithm identifiers
30
* for SHA-1, SHA-256 and SHA-512.
41
#include "k5-platform.h"
43
#include "k5-int-pkinit.h"
46
#include "pkinit_crypto.h"
48
/* statically declare OID constants for all three algorithms */
49
const krb5_octet krb5_pkinit_sha1_oid[8] =
50
{0x2B,0x06,0x01,0x05,0x02,0x03,0x06,0x01};
51
const size_t krb5_pkinit_sha1_oid_len = 8;
52
const krb5_octet krb5_pkinit_sha256_oid[8] =
53
{0x2B,0x06,0x01,0x05,0x02,0x03,0x06,0x02};
54
const size_t krb5_pkinit_sha256_oid_len = 8;
55
const krb5_octet krb5_pkinit_sha512_oid [8] =
56
{0x2B,0x06,0x01,0x05,0x02,0x03,0x06,0x03};
57
const size_t krb5_pkinit_sha512_oid_len = 8;
59
#define oid_as_data(var, oid_base) \
60
const krb5_octet_data var = \
61
{0, sizeof oid_base, (krb5_octet *) oid_base}
62
oid_as_data(sha1_id, krb5_pkinit_sha1_oid);
63
oid_as_data(sha256_id, krb5_pkinit_sha256_oid);
64
oid_as_data(sha512_id, krb5_pkinit_sha512_oid);
67
const krb5_octet_data const *supported_kdf_alg_ids[] = {