[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7894 - libmicrohttpd/src/daemon/https/x509
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7894 - libmicrohttpd/src/daemon/https/x509 |
Date: |
Sat, 15 Nov 2008 18:21:08 -0700 (MST) |
Author: grothoff
Date: 2008-11-15 18:21:08 -0700 (Sat, 15 Nov 2008)
New Revision: 7894
Modified:
libmicrohttpd/src/daemon/https/x509/extensions.c
Log:
dce
Modified: libmicrohttpd/src/daemon/https/x509/extensions.c
===================================================================
--- libmicrohttpd/src/daemon/https/x509/extensions.c 2008-11-16 01:19:43 UTC
(rev 7893)
+++ libmicrohttpd/src/daemon/https/x509/extensions.c 2008-11-16 01:21:08 UTC
(rev 7894)
@@ -171,97 +171,6 @@
}
}
-/* This function will attempt to return the requested extension OID found in
- * the given X509v3 certificate.
- *
- * If you have passed the last extension,
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will
- * be returned.
- */
-int
-MHD__gnutls_x509_crt_get_extension_oid (MHD_gnutls_x509_crt_t cert,
- int indx, void *oid,
- size_t * sizeof_oid)
-{
- int k, result, len;
- char name[MAX_NAME_SIZE], name2[MAX_NAME_SIZE];
- char str[1024];
- char extnID[128];
- int indx_counter = 0;
-
- k = 0;
- do
- {
- k++;
-
- snprintf (name, sizeof (name), "tbsCertificate.extensions.?%u", k);
-
- len = sizeof (str) - 1;
- result = MHD__asn1_read_value (cert->cert, name, str, &len);
-
- /* move to next
- */
-
- if (result == ASN1_ELEMENT_NOT_FOUND)
- {
- break;
- }
-
- do
- {
-
- MHD_gtls_str_cpy (name2, sizeof (name2), name);
- MHD_gtls_str_cat (name2, sizeof (name2), ".extnID");
-
- len = sizeof (extnID) - 1;
- result = MHD__asn1_read_value (cert->cert, name2, extnID, &len);
-
- if (result == ASN1_ELEMENT_NOT_FOUND)
- {
- MHD_gnutls_assert ();
- break;
- }
- else if (result != ASN1_SUCCESS)
- {
- MHD_gnutls_assert ();
- return MHD_gtls_asn2err (result);
- }
-
- /* Handle Extension
- */
- if (indx == indx_counter++)
- {
- len = strlen (extnID) + 1;
-
- if (*sizeof_oid < (unsigned) len)
- {
- *sizeof_oid = len;
- MHD_gnutls_assert ();
- return GNUTLS_E_SHORT_MEMORY_BUFFER;
- }
-
- memcpy (oid, extnID, len);
- *sizeof_oid = len - 1;
-
- return 0;
- }
-
-
- }
- while (0);
- }
- while (1);
-
- if (result == ASN1_ELEMENT_NOT_FOUND)
- {
- return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
- }
- else
- {
- MHD_gnutls_assert ();
- return MHD_gtls_asn2err (result);
- }
-}
-
/* Here we only extract the KeyUsage field, from the DER encoded
* extension.
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7894 - libmicrohttpd/src/daemon/https/x509,
gnunet <=