diff options
Diffstat (limited to 'src/daemon/https/x509/dn.c')
-rw-r--r-- | src/daemon/https/x509/dn.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/daemon/https/x509/dn.c b/src/daemon/https/x509/dn.c index 27c53084..0c6a2f7a 100644 --- a/src/daemon/https/x509/dn.c +++ b/src/daemon/https/x509/dn.c | |||
@@ -759,13 +759,12 @@ _gnutls_x509_encode_and_write_attribute (const char *given_oid, | |||
759 | } | 759 | } |
760 | 760 | ||
761 | /* This will write the AttributeTypeAndValue field. The data must be already DER encoded. | 761 | /* This will write the AttributeTypeAndValue field. The data must be already DER encoded. |
762 | * 'multi' must be zero if writing an AttributeTypeAndValue, and 1 if Attribute. | ||
763 | * In all cases only one value is written. | 762 | * In all cases only one value is written. |
764 | */ | 763 | */ |
765 | int | 764 | static int |
766 | _gnutls_x509_write_attribute (const char *given_oid, | 765 | _gnutls_x509_write_attribute (const char *given_oid, |
767 | ASN1_TYPE asn1_struct, const char *where, | 766 | ASN1_TYPE asn1_struct, const char *where, |
768 | const void *_data, int sizeof_data, int multi) | 767 | const void *_data, int sizeof_data) |
769 | { | 768 | { |
770 | char tmp[128]; | 769 | char tmp[128]; |
771 | int result; | 770 | int result; |
@@ -776,21 +775,6 @@ _gnutls_x509_write_attribute (const char *given_oid, | |||
776 | mhd_gtls_str_cpy (tmp, sizeof (tmp), where); | 775 | mhd_gtls_str_cpy (tmp, sizeof (tmp), where); |
777 | mhd_gtls_str_cat (tmp, sizeof (tmp), ".value"); | 776 | mhd_gtls_str_cat (tmp, sizeof (tmp), ".value"); |
778 | 777 | ||
779 | if (multi != 0) | ||
780 | { /* if not writing an AttributeTypeAndValue, but an Attribute */ | ||
781 | mhd_gtls_str_cat (tmp, sizeof (tmp), "s"); /* values */ | ||
782 | |||
783 | result = asn1_write_value (asn1_struct, tmp, "NEW", 1); | ||
784 | if (result != ASN1_SUCCESS) | ||
785 | { | ||
786 | gnutls_assert (); | ||
787 | return mhd_gtls_asn2err (result); | ||
788 | } | ||
789 | |||
790 | mhd_gtls_str_cat (tmp, sizeof (tmp), ".?LAST"); | ||
791 | |||
792 | } | ||
793 | |||
794 | result = asn1_write_value (asn1_struct, tmp, _data, sizeof_data); | 778 | result = asn1_write_value (asn1_struct, tmp, _data, sizeof_data); |
795 | if (result < 0) | 779 | if (result < 0) |
796 | { | 780 | { |
@@ -938,7 +922,7 @@ _gnutls_x509_set_dn_oid (ASN1_TYPE asn1_struct, | |||
938 | { | 922 | { |
939 | result = | 923 | result = |
940 | _gnutls_x509_write_attribute (given_oid, asn1_struct, | 924 | _gnutls_x509_write_attribute (given_oid, asn1_struct, |
941 | tmp, name, sizeof_name, 0); | 925 | tmp, name, sizeof_name); |
942 | } | 926 | } |
943 | 927 | ||
944 | if (result < 0) | 928 | if (result < 0) |