diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/asn1_lib.c')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1_lib.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c index 95e54ed626..be8daa8688 100644 --- a/src/lib/libcrypto/asn1/asn1_lib.c +++ b/src/lib/libcrypto/asn1/asn1_lib.c | |||
@@ -176,7 +176,7 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max) | |||
176 | } | 176 | } |
177 | 177 | ||
178 | /* class 0 is constructed | 178 | /* class 0 is constructed |
179 | * constructed == 2 for indefinitle length constructed */ | 179 | * constructed == 2 for indefinite length constructed */ |
180 | void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag, | 180 | void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag, |
181 | int xclass) | 181 | int xclass) |
182 | { | 182 | { |
@@ -349,7 +349,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) | |||
349 | if (data != NULL) | 349 | if (data != NULL) |
350 | { | 350 | { |
351 | memcpy(str->data,data,len); | 351 | memcpy(str->data,data,len); |
352 | /* an alowance for strings :-) */ | 352 | /* an allowance for strings :-) */ |
353 | str->data[len]='\0'; | 353 | str->data[len]='\0'; |
354 | } | 354 | } |
355 | return(1); | 355 | return(1); |
@@ -381,8 +381,8 @@ ASN1_STRING *ASN1_STRING_type_new(int type) | |||
381 | void ASN1_STRING_free(ASN1_STRING *a) | 381 | void ASN1_STRING_free(ASN1_STRING *a) |
382 | { | 382 | { |
383 | if (a == NULL) return; | 383 | if (a == NULL) return; |
384 | if (a->data != NULL) Free((char *)a->data); | 384 | if (a->data != NULL) Free(a->data); |
385 | Free((char *)a); | 385 | Free(a); |
386 | } | 386 | } |
387 | 387 | ||
388 | int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b) | 388 | int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b) |
@@ -411,3 +411,14 @@ void asn1_add_error(unsigned char *address, int offset) | |||
411 | ERR_add_error_data(4,"address=",buf1," offset=",buf2); | 411 | ERR_add_error_data(4,"address=",buf1," offset=",buf2); |
412 | } | 412 | } |
413 | 413 | ||
414 | int ASN1_STRING_length(ASN1_STRING *x) | ||
415 | { return M_ASN1_STRING_length(x); } | ||
416 | |||
417 | void ASN1_STRING_length_set(ASN1_STRING *x, int len) | ||
418 | { M_ASN1_STRING_length_set(x, len); return; } | ||
419 | |||
420 | int ASN1_STRING_type(ASN1_STRING *x) | ||
421 | { return M_ASN1_STRING_type(x); } | ||
422 | |||
423 | unsigned char * ASN1_STRING_data(ASN1_STRING *x) | ||
424 | { return M_ASN1_STRING_data(x); } | ||