63 lines
1.5 KiB
C
63 lines
1.5 KiB
C
/*
|
|
************************************************************************
|
|
**
|
|
** Copyright (c) 2010 by
|
|
** Core|Vision B.V.
|
|
** Cereslaan 10b
|
|
** 5384 VT Heesch
|
|
** The Netherlands
|
|
**
|
|
** All Rights Reserved
|
|
**
|
|
************************************************************************
|
|
*/
|
|
/*
|
|
************************************************************************
|
|
**
|
|
** Project name: Dual Inventive: Utility Library
|
|
** Filename: cp3000-cert.h
|
|
** Author: Jack Weeland
|
|
** Date: January 27, 2010
|
|
** File version: $Revision: 1.5 $
|
|
** $Date: 2013/04/15 15:37:42 $
|
|
**
|
|
************************************************************************
|
|
*/
|
|
/*
|
|
************************************************************************
|
|
**
|
|
** CP3000 certificate and key functions
|
|
**
|
|
************************************************************************
|
|
*/
|
|
|
|
#ifndef __CP3000_CERT_H
|
|
#define __CP3000_CERT_H
|
|
|
|
#include <di-util/cp3000.h>
|
|
|
|
/*
|
|
** Exported functions - Keys and digitial signatures
|
|
**
|
|
** NB: Actually loading the key or certificate is postponed till its first use!
|
|
*/
|
|
|
|
// Load private and public keys
|
|
cp3000_key_t cp3000_load_private_key(
|
|
const char *fname,
|
|
const char *passphrase // filename
|
|
);
|
|
cp3000_key_t cp3000_load_public_key(const char *fname);
|
|
|
|
// Load a certificate or certificate request
|
|
cp3000_key_t cp3000_load_certificate(const char *fname);
|
|
cp3000_key_t cp3000_load_certificate_request(const char *fname);
|
|
|
|
// Size of the key
|
|
int cp3000_get_key_size(cp3000_key_t);
|
|
|
|
// Clean-up
|
|
int cp3000_destroy_key(cp3000_key_t);
|
|
|
|
#endif /* __CP3000_CERT_H */
|