|
Packit |
fd8b60 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
Packit |
fd8b60 |
/* plugins/preauth/pkinit/pkinit_kdf_constants.c */
|
|
Packit |
fd8b60 |
/*
|
|
Packit |
fd8b60 |
* Copyright (C) 2011 by the Massachusetts Institute of Technology.
|
|
Packit |
fd8b60 |
* All rights reserved.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* Export of this software from the United States of America may
|
|
Packit |
fd8b60 |
* require a specific license from the United States Government.
|
|
Packit |
fd8b60 |
* It is the responsibility of any person or organization contemplating
|
|
Packit |
fd8b60 |
* export to obtain such a license before exporting.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
|
|
Packit |
fd8b60 |
* distribute this software and its documentation for any purpose and
|
|
Packit |
fd8b60 |
* without fee is hereby granted, provided that the above copyright
|
|
Packit |
fd8b60 |
* notice appear in all copies and that both that copyright notice and
|
|
Packit |
fd8b60 |
* this permission notice appear in supporting documentation, and that
|
|
Packit |
fd8b60 |
* the name of M.I.T. not be used in advertising or publicity pertaining
|
|
Packit |
fd8b60 |
* to distribution of the software without specific, written prior
|
|
Packit |
fd8b60 |
* permission. Furthermore if you modify this software you must label
|
|
Packit |
fd8b60 |
* your software as modified software and not distribute it in such a
|
|
Packit |
fd8b60 |
* fashion that it might be confused with the original M.I.T. software.
|
|
Packit |
fd8b60 |
* M.I.T. makes no representations about the suitability of
|
|
Packit |
fd8b60 |
* this software for any purpose. It is provided "as is" without express
|
|
Packit |
fd8b60 |
* or implied warranty.
|
|
Packit |
fd8b60 |
*/
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
/*
|
|
Packit |
fd8b60 |
* pkinit_kdf_test.c -- Structures and constants for implementation of
|
|
Packit |
fd8b60 |
* pkinit algorithm agility. Includes definitions of algorithm identifiers
|
|
Packit |
fd8b60 |
* for SHA-1, SHA-256 and SHA-512.
|
|
Packit |
fd8b60 |
*/
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#include "pkinit.h"
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
/* statically declare OID constants for all three algorithms */
|
|
Packit |
fd8b60 |
const krb5_octet krb5_pkinit_sha1_oid[8] =
|
|
Packit |
fd8b60 |
{0x2B,0x06,0x01,0x05,0x02,0x03,0x06,0x01};
|
|
Packit |
fd8b60 |
const size_t krb5_pkinit_sha1_oid_len = 8;
|
|
Packit |
fd8b60 |
const krb5_octet krb5_pkinit_sha256_oid[8] =
|
|
Packit |
fd8b60 |
{0x2B,0x06,0x01,0x05,0x02,0x03,0x06,0x02};
|
|
Packit |
fd8b60 |
const size_t krb5_pkinit_sha256_oid_len = 8;
|
|
Packit |
fd8b60 |
const krb5_octet krb5_pkinit_sha512_oid [8] =
|
|
Packit |
fd8b60 |
{0x2B,0x06,0x01,0x05,0x02,0x03,0x06,0x03};
|
|
Packit |
fd8b60 |
const size_t krb5_pkinit_sha512_oid_len = 8;
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#define oid_as_data(var, oid_base) \
|
|
Packit |
fd8b60 |
const krb5_data var = \
|
|
Packit |
fd8b60 |
{0, sizeof oid_base, (char *)oid_base}
|
|
Packit |
fd8b60 |
oid_as_data(sha1_id, krb5_pkinit_sha1_oid);
|
|
Packit |
fd8b60 |
oid_as_data(sha256_id, krb5_pkinit_sha256_oid);
|
|
Packit |
fd8b60 |
oid_as_data(sha512_id, krb5_pkinit_sha512_oid);
|
|
Packit |
fd8b60 |
#undef oid_as_data
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
krb5_data const * const supported_kdf_alg_ids[] = {
|
|
Packit |
fd8b60 |
&sha256_id,
|
|
Packit |
fd8b60 |
&sha1_id,
|
|
Packit |
fd8b60 |
&sha512_id,
|
|
Packit |
fd8b60 |
NULL
|
|
Packit |
fd8b60 |
};
|