mmc.h 1.24 KB
Newer Older
1
2
/*
 * This file is part of libaacs
3
 * Copyright (C) 2009-2010  Obliter0n
4
 *
gates's avatar
gates committed
5
6
7
8
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
9
 *
gates's avatar
gates committed
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
gates's avatar
gates committed
12
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
14
 *
gates's avatar
gates committed
15
16
17
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see
 * <http://www.gnu.org/licenses/>.
18
19
 */

20
21
22
#ifndef MMC_H_
#define MMC_H_

23
24
#include <util/attributes.h>

25
26
27
28
#include <stdint.h>

typedef struct mmc MMC;

npzacs's avatar
npzacs committed
29
30
31
32
#define MMC_SUCCESS             0 /* no errors */
#define MMC_ERROR              -1 /* MMC failed */
#define MMC_ERROR_CERT_REVOKED -2 /* revoked certificate */

npzacs's avatar
npzacs committed
33
AACS_PRIVATE MMC *mmc_open(const char *path);
34
AACS_PRIVATE void mmc_close(MMC *mmc);
npzacs's avatar
npzacs committed
35
36
AACS_PRIVATE int  mmc_read_vid(MMC *mmc, const uint8_t *host_priv_key, const uint8_t *host_cert,
                               uint8_t *vid);
37
38

#endif /* MMC_H_ */