mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-10-07 04:02:18 +03:00
chapters/
This commit is contained in:
1 parent
32202485b0
commit
48d5da0ba7
6 files changed
+2114
-800
No files matched your search
@@ -759,13 +759,12 @@ _gnutls_x509_encode_and_write_attribute (const char *given_oid,
|
||||
}
|
||||
|
||||
/* This will write the AttributeTypeAndValue field. The data must be already DER encoded.
|
||||
* 'multi' must be zero if writing an AttributeTypeAndValue, and 1 if Attribute.
|
||||
* In all cases only one value is written.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
_gnutls_x509_write_attribute (const char *given_oid,
|
||||
ASN1_TYPE asn1_struct, const char *where,
|
||||
const void *_data, int sizeof_data, int multi)
|
||||
const void *_data, int sizeof_data)
|
||||
{
|
||||
char tmp[128];
|
||||
int result;
|
||||
@@ -776,21 +775,6 @@ _gnutls_x509_write_attribute (const char *given_oid,
|
||||
mhd_gtls_str_cpy (tmp, sizeof (tmp), where);
|
||||
mhd_gtls_str_cat (tmp, sizeof (tmp), ".value");
|
||||
|
||||
if (multi != 0)
|
||||
{ /* if not writing an AttributeTypeAndValue, but an Attribute */
|
||||
mhd_gtls_str_cat (tmp, sizeof (tmp), "s"); /* values */
|
||||
|
||||
result = asn1_write_value (asn1_struct, tmp, "NEW", 1);
|
||||
if (result != ASN1_SUCCESS)
|
||||
{
|
||||
gnutls_assert ();
|
||||
return mhd_gtls_asn2err (result);
|
||||
}
|
||||
|
||||
mhd_gtls_str_cat (tmp, sizeof (tmp), ".?LAST");
|
||||
|
||||
}
|
||||
|
||||
result = asn1_write_value (asn1_struct, tmp, _data, sizeof_data);
|
||||
if (result < 0)
|
||||
{
|
||||
@@ -938,7 +922,7 @@ _gnutls_x509_set_dn_oid (ASN1_TYPE asn1_struct,
|
||||
{
|
||||
result =
|
||||
_gnutls_x509_write_attribute (given_oid, asn1_struct,
|
||||
tmp, name, sizeof_name, 0);
|
||||
tmp, name, sizeof_name);
|
||||
}
|
||||
|
||||
if (result < 0)
|
||||
|
||||
Reference in new issue
Block a user