diff options
author | djm <> | 2008-09-06 12:17:54 +0000 |
---|---|---|
committer | djm <> | 2008-09-06 12:17:54 +0000 |
commit | 38ce604e3cc97706b876b0525ddff0121115456d (patch) | |
tree | 7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/asn1/a_mbstr.c | |
parent | 12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff) | |
download | openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2 openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/asn1/a_mbstr.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_mbstr.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/asn1/a_mbstr.c b/src/lib/libcrypto/asn1/a_mbstr.c index 208b3ec395..2d4800a22a 100644 --- a/src/lib/libcrypto/asn1/a_mbstr.c +++ b/src/lib/libcrypto/asn1/a_mbstr.c | |||
@@ -107,7 +107,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
107 | 107 | ||
108 | case MBSTRING_BMP: | 108 | case MBSTRING_BMP: |
109 | if(len & 1) { | 109 | if(len & 1) { |
110 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, | 110 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, |
111 | ASN1_R_INVALID_BMPSTRING_LENGTH); | 111 | ASN1_R_INVALID_BMPSTRING_LENGTH); |
112 | return -1; | 112 | return -1; |
113 | } | 113 | } |
@@ -116,7 +116,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
116 | 116 | ||
117 | case MBSTRING_UNIV: | 117 | case MBSTRING_UNIV: |
118 | if(len & 3) { | 118 | if(len & 3) { |
119 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, | 119 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, |
120 | ASN1_R_INVALID_UNIVERSALSTRING_LENGTH); | 120 | ASN1_R_INVALID_UNIVERSALSTRING_LENGTH); |
121 | return -1; | 121 | return -1; |
122 | } | 122 | } |
@@ -128,7 +128,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
128 | /* This counts the characters and does utf8 syntax checking */ | 128 | /* This counts the characters and does utf8 syntax checking */ |
129 | ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar); | 129 | ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar); |
130 | if(ret < 0) { | 130 | if(ret < 0) { |
131 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, | 131 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, |
132 | ASN1_R_INVALID_UTF8STRING); | 132 | ASN1_R_INVALID_UTF8STRING); |
133 | return -1; | 133 | return -1; |
134 | } | 134 | } |
@@ -139,19 +139,19 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
139 | break; | 139 | break; |
140 | 140 | ||
141 | default: | 141 | default: |
142 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_UNKNOWN_FORMAT); | 142 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_UNKNOWN_FORMAT); |
143 | return -1; | 143 | return -1; |
144 | } | 144 | } |
145 | 145 | ||
146 | if((minsize > 0) && (nchar < minsize)) { | 146 | if((minsize > 0) && (nchar < minsize)) { |
147 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_SHORT); | 147 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); |
148 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize); | 148 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize); |
149 | ERR_add_error_data(2, "minsize=", strbuf); | 149 | ERR_add_error_data(2, "minsize=", strbuf); |
150 | return -1; | 150 | return -1; |
151 | } | 151 | } |
152 | 152 | ||
153 | if((maxsize > 0) && (nchar > maxsize)) { | 153 | if((maxsize > 0) && (nchar > maxsize)) { |
154 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_LONG); | 154 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); |
155 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize); | 155 | BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize); |
156 | ERR_add_error_data(2, "maxsize=", strbuf); | 156 | ERR_add_error_data(2, "maxsize=", strbuf); |
157 | return -1; | 157 | return -1; |
@@ -159,7 +159,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
159 | 159 | ||
160 | /* Now work out minimal type (if any) */ | 160 | /* Now work out minimal type (if any) */ |
161 | if(traverse_string(in, len, inform, type_str, &mask) < 0) { | 161 | if(traverse_string(in, len, inform, type_str, &mask) < 0) { |
162 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_ILLEGAL_CHARACTERS); | 162 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_ILLEGAL_CHARACTERS); |
163 | return -1; | 163 | return -1; |
164 | } | 164 | } |
165 | 165 | ||
@@ -193,7 +193,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
193 | free_out = 1; | 193 | free_out = 1; |
194 | dest = ASN1_STRING_type_new(str_type); | 194 | dest = ASN1_STRING_type_new(str_type); |
195 | if(!dest) { | 195 | if(!dest) { |
196 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY, | 196 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, |
197 | ERR_R_MALLOC_FAILURE); | 197 | ERR_R_MALLOC_FAILURE); |
198 | return -1; | 198 | return -1; |
199 | } | 199 | } |
@@ -202,7 +202,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
202 | /* If both the same type just copy across */ | 202 | /* If both the same type just copy across */ |
203 | if(inform == outform) { | 203 | if(inform == outform) { |
204 | if(!ASN1_STRING_set(dest, in, len)) { | 204 | if(!ASN1_STRING_set(dest, in, len)) { |
205 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY,ERR_R_MALLOC_FAILURE); | 205 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,ERR_R_MALLOC_FAILURE); |
206 | return -1; | 206 | return -1; |
207 | } | 207 | } |
208 | return str_type; | 208 | return str_type; |
@@ -233,7 +233,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
233 | } | 233 | } |
234 | if(!(p = OPENSSL_malloc(outlen + 1))) { | 234 | if(!(p = OPENSSL_malloc(outlen + 1))) { |
235 | if(free_out) ASN1_STRING_free(dest); | 235 | if(free_out) ASN1_STRING_free(dest); |
236 | ASN1err(ASN1_F_ASN1_MBSTRING_COPY,ERR_R_MALLOC_FAILURE); | 236 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,ERR_R_MALLOC_FAILURE); |
237 | return -1; | 237 | return -1; |
238 | } | 238 | } |
239 | dest->length = outlen; | 239 | dest->length = outlen; |