|
Packit Service |
ed0f68 |
/*
|
|
Packit Service |
ed0f68 |
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
|
Packit Service |
ed0f68 |
*
|
|
Packit Service |
ed0f68 |
* Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
ed0f68 |
* modification, are permitted provided that the following conditions
|
|
Packit Service |
ed0f68 |
* are met:
|
|
Packit Service |
ed0f68 |
*
|
|
Packit Service |
ed0f68 |
* Redistribution of source code must retain the above copyright
|
|
Packit Service |
ed0f68 |
* notice, this list of conditions and the following disclaimer.
|
|
Packit Service |
ed0f68 |
*
|
|
Packit Service |
ed0f68 |
* Redistribution in binary form must reproduce the above copyright
|
|
Packit Service |
ed0f68 |
* notice, this list of conditions and the following disclaimer in the
|
|
Packit Service |
ed0f68 |
* documentation and/or other materials provided with the distribution.
|
|
Packit Service |
ed0f68 |
*
|
|
Packit Service |
ed0f68 |
* Neither the name of Sun Microsystems, Inc. or the names of
|
|
Packit Service |
ed0f68 |
* contributors may be used to endorse or promote products derived
|
|
Packit Service |
ed0f68 |
* from this software without specific prior written permission.
|
|
Packit Service |
ed0f68 |
*
|
|
Packit Service |
ed0f68 |
* This software is provided "AS IS," without a warranty of any kind.
|
|
Packit Service |
ed0f68 |
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
|
Packit Service |
ed0f68 |
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
|
Packit Service |
ed0f68 |
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
|
Packit Service |
ed0f68 |
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
|
Packit Service |
ed0f68 |
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
|
Packit Service |
ed0f68 |
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
|
Packit Service |
ed0f68 |
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
|
Packit Service |
ed0f68 |
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
|
Packit Service |
ed0f68 |
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
|
Packit Service |
ed0f68 |
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
Packit Service |
ed0f68 |
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
Packit Service |
ed0f68 |
*/
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
#ifndef IPMI_LANPLUS_CRYPT_H
|
|
Packit Service |
ed0f68 |
#define IPMI_LANPLUS_CRYPT_H
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
#include <ipmitool/ipmi_intf.h>
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
/*
|
|
Packit Service |
ed0f68 |
* See the implementation file for documentation
|
|
Packit Service |
ed0f68 |
* ipmi_intf can be used for oem specific implementations
|
|
Packit Service |
ed0f68 |
* e.g. if (ipmi_oem_active(intf, "OEM_XYZ"))
|
|
Packit Service |
ed0f68 |
*/
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
int lanplus_rakp2_hmac_matches(const struct ipmi_session * session,
|
|
Packit Service |
ed0f68 |
const uint8_t * hmac,
|
|
Packit Service |
ed0f68 |
struct ipmi_intf * intf);
|
|
Packit Service |
ed0f68 |
int lanplus_rakp4_hmac_matches(const struct ipmi_session * session,
|
|
Packit Service |
ed0f68 |
const uint8_t * hmac,
|
|
Packit Service |
ed0f68 |
struct ipmi_intf * intf);
|
|
Packit Service |
ed0f68 |
int lanplus_generate_rakp3_authcode(uint8_t * buffer,
|
|
Packit Service |
ed0f68 |
const struct ipmi_session * session,
|
|
Packit Service |
ed0f68 |
uint32_t * auth_length,
|
|
Packit Service |
ed0f68 |
struct ipmi_intf * intf);
|
|
Packit Service |
ed0f68 |
int lanplus_generate_sik(struct ipmi_session * session, struct ipmi_intf * intf);
|
|
Packit Service |
ed0f68 |
int lanplus_generate_k1(struct ipmi_session * session);
|
|
Packit Service |
ed0f68 |
int lanplus_generate_k2(struct ipmi_session * session);
|
|
Packit Service |
ed0f68 |
int lanplus_encrypt_payload(uint8_t crypt_alg,
|
|
Packit Service |
ed0f68 |
const uint8_t * key,
|
|
Packit Service |
ed0f68 |
const uint8_t * input,
|
|
Packit Service |
ed0f68 |
uint32_t input_length,
|
|
Packit Service |
ed0f68 |
uint8_t * output,
|
|
Packit Service |
ed0f68 |
uint16_t * bytesWritten);
|
|
Packit Service |
ed0f68 |
int lanplus_decrypt_payload(uint8_t crypt_alg,
|
|
Packit Service |
ed0f68 |
const uint8_t * key,
|
|
Packit Service |
ed0f68 |
const uint8_t * input,
|
|
Packit Service |
ed0f68 |
uint32_t input_length,
|
|
Packit Service |
ed0f68 |
uint8_t * output,
|
|
Packit Service |
ed0f68 |
uint16_t * payload_size);
|
|
Packit Service |
ed0f68 |
int lanplus_has_valid_auth_code(struct ipmi_rs * rs,
|
|
Packit Service |
ed0f68 |
struct ipmi_session * session);
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
|
|
Packit Service |
ed0f68 |
#endif /* IPMI_LANPLUS_CRYPT_H */
|