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) |
const char * | ccn_keystore_digest_algorithm (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. |
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.
struct ccn_certificate* ccn_keystore_certificate | ( | struct ccn_keystore * | p | ) | [read] |
Definition at line 165 of file ccn_keystore.c.
struct ccn_keystore* ccn_keystore_create | ( | void | ) | [read] |
Definition at line 47 of file ccn_keystore.c.
Referenced by ccn_load_private_key(), and main().
void ccn_keystore_destroy | ( | struct ccn_keystore ** | p | ) |
Definition at line 54 of file ccn_keystore.c.
Referenced by ccn_load_private_key(), finalize_keystore(), and main().
const char* ccn_keystore_digest_algorithm | ( | struct ccn_keystore * | p | ) |
Definition at line 143 of file ccn_keystore.c.
Referenced by ccn_sign_content(), and main().
int ccn_keystore_file_init | ( | char * | filename, | |
char * | password, | |||
char * | subject, | |||
int | keylength, | |||
int | validity_days | |||
) |
Create a PKCS12 keystore file.
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. |
Definition at line 212 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 71 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 125 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 134 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 157 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 151 of file ccn_keystore.c.
Referenced by ccn_get_public_key(), ccn_load_private_key(), ccn_sign_content(), and main().