summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_strex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/a_strex.c')
-rw-r--r--src/lib/libcrypto/asn1/a_strex.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/lib/libcrypto/asn1/a_strex.c b/src/lib/libcrypto/asn1/a_strex.c
index 264ebf2393..7fc14d3296 100644
--- a/src/lib/libcrypto/asn1/a_strex.c
+++ b/src/lib/libcrypto/asn1/a_strex.c
@@ -74,11 +74,6 @@
74 74
75#define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253) 75#define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
76 76
77#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \
78 ASN1_STRFLGS_ESC_QUOTE | \
79 ASN1_STRFLGS_ESC_CTRL | \
80 ASN1_STRFLGS_ESC_MSB)
81
82 77
83/* Three IO functions for sending data to memory, a BIO and 78/* Three IO functions for sending data to memory, a BIO and
84 * and a FILE pointer. 79 * and a FILE pointer.
@@ -153,13 +148,6 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
153 if(!io_ch(arg, tmphex, 3)) return -1; 148 if(!io_ch(arg, tmphex, 3)) return -1;
154 return 3; 149 return 3;
155 } 150 }
156 /* If we get this far and do any escaping at all must escape
157 * the escape character itself: backslash.
158 */
159 if (chtmp == '\\' && flags & ESC_FLAGS) {
160 if(!io_ch(arg, "\\\\", 2)) return -1;
161 return 2;
162 }
163 if(!io_ch(arg, &chtmp, 1)) return -1; 151 if(!io_ch(arg, &chtmp, 1)) return -1;
164 return 1; 152 return 1;
165} 153}
@@ -304,6 +292,11 @@ static const signed char tag2nbyte[] = {
304 4, -1, 2 /* 28-30 */ 292 4, -1, 2 /* 28-30 */
305}; 293};
306 294
295#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \
296 ASN1_STRFLGS_ESC_QUOTE | \
297 ASN1_STRFLGS_ESC_CTRL | \
298 ASN1_STRFLGS_ESC_MSB)
299
307/* This is the main function, print out an 300/* This is the main function, print out an
308 * ASN1_STRING taking note of various escape 301 * ASN1_STRING taking note of various escape
309 * and display options. Returns number of 302 * and display options. Returns number of