summaryrefslogtreecommitdiff
path: root/src/certtool-common.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-05-23 14:05:32 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-06-03 19:54:31 +0200
commitd4a4643dbe1bd739e55706fa4affaf10aae1dfa9 (patch)
tree9370894ecc414e53d4cca7aa2449c24e10ec89bc /src/certtool-common.h
parentb6e40a9119444a56af19f5bbbd33c3842b758438 (diff)
downloadgnutls-d4a4643dbe1bd739e55706fa4affaf10aae1dfa9.tar.gz
Added support to copy certificates and private keys to tokens.
New functions: gnutls_pkcs11_copy_x509_crt() gnutls_pkcs11_copy_x509_privkey() gnutls_pkcs11_delete_url() Certtool was updated to allow copying certificates and private keys to tokens. Deleting an object has issues (segfault) but it seems to be related with libopensc and its pkcs11 API.
Diffstat (limited to 'src/certtool-common.h')
-rw-r--r--src/certtool-common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/certtool-common.h b/src/certtool-common.h
index f5db0abd80..79d2300471 100644
--- a/src/certtool-common.h
+++ b/src/certtool-common.h
@@ -29,6 +29,8 @@ enum
ACTION_PKCS11_LIST,
ACTION_PKCS11_TOKENS,
ACTION_PKCS11_EXPORT_URL,
+ ACTION_PKCS11_WRITE_URL,
+ ACTION_PKCS11_DELETE_URL,
ACTION_PUBKEY_INFO,
};
@@ -39,6 +41,8 @@ void certtool_version (void);
void pkcs11_list( FILE*outfile, const char* url, int type);
void pkcs11_export(FILE* outfile, const char *pkcs11_url);
void pkcs11_token_list(FILE* outfile);
+void pkcs11_write(FILE* outfile, const char *pkcs11_url, const char* label, int trusted);
+void pkcs11_delete(FILE* outfile, const char *pkcs11_url, int batch);
#define PKCS11_TYPE_CRT_ALL 1
#define PKCS11_TYPE_TRUSTED 2
@@ -47,3 +51,13 @@ void pkcs11_token_list(FILE* outfile);
extern unsigned char buffer[];
extern const int buffer_size;
+
+#include <gnutls/x509.h>
+#include <gnutls/abstract.h>
+
+gnutls_x509_privkey_t load_private_key (int mand);
+gnutls_x509_crq_t load_request (void);
+gnutls_x509_privkey_t load_ca_private_key (void);
+gnutls_x509_crt_t load_ca_cert (void);
+gnutls_x509_crt_t load_cert (int mand);
+gnutls_pubkey_t load_pubkey (int mand);