keystore.h File Reference

KEYSTORE interface. More...

Go to the source code of this file.

Functions

struct ccn_keystore * ccn_keystore_create (void)
void ccn_keystore_destroy (struct ccn_keystore **p)
int ccn_keystore_init (struct ccn_keystore *p, char *name, char *password)
struct ccn_pkey * ccn_keystore_private_key (struct ccn_keystore *p)
struct ccn_pkey * ccn_keystore_public_key (struct ccn_keystore *p)
ssize_t ccn_keystore_public_key_digest_length (struct ccn_keystore *p)
const unsigned char * ccn_keystore_public_key_digest (struct ccn_keystore *p)
struct ccn_certificate * ccn_keystore_certificate (struct ccn_keystore *p)
int ccn_keystore_file_init (char *filename, char *password, char *subject, int keylength, int validity_days)
 Create a PKCS12 keystore file.


Detailed Description

KEYSTORE interface.

This is a veneer so that the ccn code can avoid exposure to the underlying keystore implementation types.

Part of the CCNx C Library.

Copyright (C) 2009 Palo Alto Research Center, Inc.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file keystore.h.


Function Documentation

struct ccn_certificate* ccn_keystore_certificate ( struct ccn_keystore *  p  )  [read]

Definition at line 132 of file ccn_keystore.c.

struct ccn_keystore* ccn_keystore_create ( void   )  [read]

Definition at line 46 of file ccn_keystore.c.

Referenced by ccn_load_private_key(), and main().

void ccn_keystore_destroy ( struct ccn_keystore **  p  ) 

Definition at line 53 of file ccn_keystore.c.

Referenced by ccn_load_private_key(), finalize_keystore(), and main().

int ccn_keystore_file_init ( char *  filename,
char *  password,
char *  subject,
int  keylength,
int  validity_days 
)

Create a PKCS12 keystore file.

Parameters:
filename the name of the keystore file to be created.
password the import/export password for the keystore.
subject the subject (and issuer) name in the certificate.
keylength the number of bits in the RSA key to be generated. A value <= 0 will result in the default (1024) being used.
validity_days the number of days the certificate in the keystore will be valid. A value <= 0 will result in the default (30) being used.
Returns:
0 on success, -1 on failure

Definition at line 179 of file ccn_keystore.c.

Referenced by ccnd_init_internal_keystore(), ccnr_init_repo_keystore(), and main().

int ccn_keystore_init ( struct ccn_keystore *  p,
char *  name,
char *  password 
)

Definition at line 68 of file ccn_keystore.c.

Referenced by ccn_load_private_key(), and main().

struct ccn_pkey* ccn_keystore_private_key ( struct ccn_keystore *  p  )  [read]

Definition at line 100 of file ccn_keystore.c.

Referenced by ccn_sign_content(), and main().

struct ccn_pkey* ccn_keystore_public_key ( struct ccn_keystore *  p  )  [read]

Definition at line 109 of file ccn_keystore.c.

Referenced by ccn_get_public_key(), ccn_sign_content(), and main().

const unsigned char* ccn_keystore_public_key_digest ( struct ccn_keystore *  p  ) 

Definition at line 124 of file ccn_keystore.c.

Referenced by ccn_get_public_key(), ccn_load_private_key(), ccn_sign_content(), and main().

ssize_t ccn_keystore_public_key_digest_length ( struct ccn_keystore *  p  ) 

Definition at line 118 of file ccn_keystore.c.

Referenced by ccn_get_public_key(), ccn_load_private_key(), ccn_sign_content(), and main().


Generated on Thu Feb 16 00:44:18 2012 for Content-Centric Networking in C by  doxygen 1.5.6