summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-04-04 10:30:56 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-04-04 11:34:15 +0200
commitc2e05f97b6e32887f548d12e20291bde750d5390 (patch)
tree26d98e7c67482bbda8a2b046302d119ba20876f6 /lib
parent45050a7aa57ec07701c32fc3ff7d92202a5a8db3 (diff)
downloadgnutls-c2e05f97b6e32887f548d12e20291bde750d5390.tar.gz
doc updates
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto-api.c2
-rw-r--r--lib/gnutls_mem.c2
-rw-r--r--lib/gnutls_privkey.c1
-rw-r--r--lib/gnutls_pubkey.c1
-rw-r--r--lib/includes/gnutls/abstract.h5
-rw-r--r--lib/includes/gnutls/pkcs11.h10
-rw-r--r--lib/pkcs11_privkey.c3
-rw-r--r--lib/pkcs11_write.c20
-rw-r--r--lib/safe-memfuncs.c2
-rw-r--r--lib/tpm.c2
10 files changed, 37 insertions, 11 deletions
diff --git a/lib/crypto-api.c b/lib/crypto-api.c
index d9a796f8cd..e169092cf1 100644
--- a/lib/crypto-api.c
+++ b/lib/crypto-api.c
@@ -216,7 +216,7 @@ gnutls_cipher_decrypt(gnutls_cipher_hd_t handle, void *ctext,
* gnutls_cipher_encrypt2:
* @handle: is a #gnutls_cipher_hd_t type
* @ptext: the data to encrypt
- * @ptextlen: the length of data to encrypt
+ * @ptext_len: the length of data to encrypt
* @ctext: the encrypted data
* @ctext_len: the available length for encrypted data
*
diff --git a/lib/gnutls_mem.c b/lib/gnutls_mem.c
index d2da8b0ffe..b4b49ddd45 100644
--- a/lib/gnutls_mem.c
+++ b/lib/gnutls_mem.c
@@ -94,6 +94,7 @@ char *_gnutls_strdup(const char *str)
**/
void *gnutls_malloc(size_t s)
{
+ int x;
}
/**
@@ -108,6 +109,7 @@ void *gnutls_malloc(size_t s)
**/
void gnutls_free(void *ptr)
{
+ int x;
}
#endif
diff --git a/lib/gnutls_privkey.c b/lib/gnutls_privkey.c
index a07cba7d8e..d9a843fca2 100644
--- a/lib/gnutls_privkey.c
+++ b/lib/gnutls_privkey.c
@@ -391,6 +391,7 @@ gnutls_privkey_import_pkcs11(gnutls_privkey_t pkey,
int gnutls_privkey_import_pkcs11_url(gnutls_privkey_t key, const char *url)
{
+ int x;
}
#endif
diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c
index 494432c32a..1eee1ec77a 100644
--- a/lib/gnutls_pubkey.c
+++ b/lib/gnutls_pubkey.c
@@ -1229,6 +1229,7 @@ int
gnutls_pubkey_import_pkcs11_url(gnutls_pubkey_t key, const char *url,
unsigned int flags)
{
+ int x;
}
#endif
diff --git a/lib/includes/gnutls/abstract.h b/lib/includes/gnutls/abstract.h
index 9f8532cea3..44123ec2ab 100644
--- a/lib/includes/gnutls/abstract.h
+++ b/lib/includes/gnutls/abstract.h
@@ -323,6 +323,11 @@ gnutls_privkey_import_tpm_url(gnutls_privkey_t pkey,
int gnutls_privkey_import_url(gnutls_privkey_t key,
const char *url, unsigned int flags);
+#if 0
+/* for documentation purposes */
+int gnutls_privkey_import_pkcs11_url(gnutls_privkey_t key, const char *url);
+#endif
+
#define gnutls_privkey_import_pkcs11_url(key, url) gnutls_privkey_import_url(key, url, 0)
int
diff --git a/lib/includes/gnutls/pkcs11.h b/lib/includes/gnutls/pkcs11.h
index 97ef7551b7..5d63cdedac 100644
--- a/lib/includes/gnutls/pkcs11.h
+++ b/lib/includes/gnutls/pkcs11.h
@@ -204,6 +204,16 @@ int gnutls_pkcs11_copy_x509_privkey(const char *token_url,
const char *label,
unsigned int key_usage,
unsigned int flags);
+int
+gnutls_pkcs11_privkey_generate2(const char *url, gnutls_pk_algorithm_t pk,
+ unsigned int bits, const char *label,
+ gnutls_x509_crt_fmt_t fmt,
+ gnutls_datum_t * pubkey,
+ unsigned int flags);
+int
+gnutls_pkcs11_privkey_generate(const char *url, gnutls_pk_algorithm_t pk,
+ unsigned int bits, const char *label,
+ unsigned int flags);
#endif
#define gnutls_pkcs11_copy_x509_crt(url, crt, label, flags) \
diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c
index 70fe11c61f..f0c75b1fb1 100644
--- a/lib/pkcs11_privkey.c
+++ b/lib/pkcs11_privkey.c
@@ -614,9 +614,9 @@ gnutls_pkcs11_privkey_export_url(gnutls_pkcs11_privkey_t key,
int
gnutls_pkcs11_privkey_generate(const char *url, gnutls_pk_algorithm_t pk,
unsigned int bits, const char *label,
- const gnutls_datum_t *cid,
unsigned int flags)
{
+ int x;
}
/**
@@ -651,6 +651,7 @@ gnutls_pkcs11_privkey_generate2(const char *url, gnutls_pk_algorithm_t pk,
gnutls_datum_t * pubkey,
unsigned int flags)
{
+ int x;
}
#endif
diff --git a/lib/pkcs11_write.c b/lib/pkcs11_write.c
index 3cce613d92..1cc4ac53ec 100644
--- a/lib/pkcs11_write.c
+++ b/lib/pkcs11_write.c
@@ -226,12 +226,15 @@ gnutls_pkcs11_copy_x509_crt2(const char *token_url,
/**
* gnutls_pkcs11_copy_attached_extension:
* @token_url: A PKCS #11 URL specifying a token
- * @obj: A pkcs11 object
- * @label: A name to be used for the stored data
+ * @crt: An X.509 certificate object
+ * @data: the attached extension
+ * @label: A name to be used for the attached extension (may be %NULL)
* @flags: One of GNUTLS_PKCS11_OBJ_FLAG_*
*
- * This function will copy an object into a PKCS #11 token specified by
- * a URL.
+ * This function will copy an the attached extension in @data for
+ * the certificate provided in @crt in the PKCS #11 token specified
+ * by the URL (typically a trust module). The extension must be in
+ * RFC5280 Extension format.
*
* Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
* negative error value.
@@ -1040,6 +1043,7 @@ gnutls_pkcs11_token_get_random(const char *token_url,
#if 0
/* For documentation purposes */
+
/**
* gnutls_pkcs11_copy_x509_crt:
* @token_url: A PKCS #11 URL specifying a token
@@ -1055,10 +1059,11 @@ gnutls_pkcs11_token_get_random(const char *token_url,
*
* Since: 2.12.0
**/
-gnutls_pkcs11_copy_x509_crt(const char *token_url,
+int gnutls_pkcs11_copy_x509_crt(const char *token_url,
gnutls_x509_crt_t crt, const char *label,
unsigned int flags)
{
+ int x;
}
/**
@@ -1078,11 +1083,12 @@ gnutls_pkcs11_copy_x509_crt(const char *token_url,
*
* Since: 2.12.0
**/
-int
-gnutls_pkcs11_copy_x509_privkey(const char *token_url,
+int gnutls_pkcs11_copy_x509_privkey(const char *token_url,
gnutls_x509_privkey_t key,
const char *label,
unsigned int key_usage, unsigned int flags)
{
+ int x;
}
+
#endif
diff --git a/lib/safe-memfuncs.c b/lib/safe-memfuncs.c
index f0a4975414..47d9ad1287 100644
--- a/lib/safe-memfuncs.c
+++ b/lib/safe-memfuncs.c
@@ -28,7 +28,7 @@
* gnutls_memset:
* @data: the memory to set
* @c: the constant byte to fill the memory with
- * @n: the size of memory
+ * @size: the size of memory
*
* This function will operate similarly to memset(), but will
* not be optimized out by the compiler.
diff --git a/lib/tpm.c b/lib/tpm.c
index 64ac26d290..41a238b709 100644
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -1178,7 +1178,7 @@ gnutls_pubkey_import_tpm_url(gnutls_pubkey_t pkey,
* Allowed flags are:
*
* %GNUTLS_TPM_KEY_SIGNING: Generate a signing key instead of a legacy,
-
+ *
* %GNUTLS_TPM_REGISTER_KEY: Register the generate key in TPM. In that
* case @privkey would contain a URL with the UUID.
*