summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_object.c
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2017-08-04 11:24:03 +1000
committerPauli <paul.dale@oracle.com>2017-08-04 11:24:03 +1000
commitcf37aaa335965902c6a022bc3c3e0162f59c0f3a (patch)
treeb00a60fd9a70836f4d97478432cd4d9ddaae73fa /crypto/asn1/a_object.c
parent2326bba0e5cbe98f4d00855a6909b1f14b6f5427 (diff)
Consolidate to a single asn1_time_from_tm() function
Add missing ASN1_TIME functions Do some cleanup of the ASN1_TIME code. Add ASN1_TIME_normalize() to normalize ASN1_TIME structures. Add ASN1_TIME_compare() to compare two ASN1_TIME structures. Add ASN1_TIME_cmp_time_t() to compare an ASN1_TIME to time_t (generic version of ASN1_UTCTIME_cmp_time_t()). Replace '0' .. '9' compares with isdigit() Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2753)
Diffstat (limited to 'crypto/asn1/a_object.c')
-rw-r--r--crypto/asn1/a_object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c
index 79f0ecd2a8..5ae56a24ea 100644
--- a/crypto/asn1/a_object.c
+++ b/crypto/asn1/a_object.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <limits.h>
+#include <ctype.h>
#include "internal/cryptlib.h"
#include <openssl/buffer.h>
#include <openssl/asn1.h>
@@ -84,7 +85,7 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
c = *(p++);
if ((c == ' ') || (c == '.'))
break;
- if ((c < '0') || (c > '9')) {
+ if (!isdigit(c)) {
ASN1err(ASN1_F_A2D_ASN1_OBJECT, ASN1_R_INVALID_DIGIT);
goto err;
}