Skip to content

Commit

Permalink
Fix ASN1_TIME_to_generalizedtime to take a const ASN1_TIME
Browse files Browse the repository at this point in the history
Fixes openssl#1526

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from openssl#3360)
(cherry picked from commit 9bfeeef)
  • Loading branch information
mattcaswell authored and pracj3am committed Aug 22, 2017
1 parent dc12517 commit afcfd5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crypto/asn1/a_time.c
Expand Up @@ -59,7 +59,7 @@ int ASN1_TIME_check(const ASN1_TIME *t)
}

/* Convert an ASN1_TIME structure to GeneralizedTime */
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t,
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
ASN1_GENERALIZEDTIME **out)
{
ASN1_GENERALIZEDTIME *ret = NULL;
Expand Down
4 changes: 2 additions & 2 deletions include/openssl/asn1.h
Expand Up @@ -625,8 +625,8 @@ ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
int offset_day, long offset_sec);
int ASN1_TIME_check(const ASN1_TIME *t);
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
**out);
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
ASN1_GENERALIZEDTIME **out);
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);

int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
Expand Down

0 comments on commit afcfd5f

Please sign in to comment.