summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/krb5/asn.1/ChangeLog12
-rw-r--r--src/lib/krb5/asn.1/asn1_encode.c4
-rw-r--r--src/lib/krb5/asn.1/asn1_encode.h20
3 files changed, 24 insertions, 12 deletions
diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog
index f788a2f51b..ce20ff65c4 100644
--- a/src/lib/krb5/asn.1/ChangeLog
+++ b/src/lib/krb5/asn.1/ChangeLog
@@ -1,3 +1,15 @@
+2004-06-10 Ken Raeburn <raeburn@mit.edu>
+
+ * asn1_encode.c (asn1_encode_generaltime): Fix memcpy argument to
+ actually be a pointer.
+ (asn1_encode_enumerated): Drop "const" from scalar argument type.
+ * asn1_encode.h (asn1_encode_integer, asn1_encode_enumerated,
+ asn1_encode_unsigned_integer, asn1_encode_octetstring,
+ asn1_encode_charstring, asn1_encode_printablestring,
+ asn1_encode_ia5string, asn1_encode_generaltime,
+ asn1_encode_generalstring): Drop "const" from scalar argument
+ types.
+
2004-06-04 Ken Raeburn <raeburn@mit.edu>
* asn1_encode.c (asn1_encode_generaltime): Use gmtime_r if
diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c
index 9d2912800b..4f9e6949b5 100644
--- a/src/lib/krb5/asn.1/asn1_encode.c
+++ b/src/lib/krb5/asn.1/asn1_encode.c
@@ -80,7 +80,7 @@ asn1_error_code asn1_encode_integer(asn1buf * buf, long val,
}
asn1_error_code
-asn1_encode_enumerated(asn1buf * buf, const long val,
+asn1_encode_enumerated(asn1buf * buf, long val,
unsigned int *retlen)
{
asn1_error_code retval;
@@ -248,7 +248,7 @@ asn1_error_code asn1_encode_generaltime(asn1buf *buf, time_t val,
gtime = gmtime(&gmt_time);
if (gtime == NULL)
return ASN1_BAD_GMTIME;
- memcpy(gtimebuf, gtime, sizeof(gtimebuf));
+ memcpy(&gtimebuf, gtime, sizeof(gtimebuf));
#endif
gtime = &gtimebuf;
diff --git a/src/lib/krb5/asn.1/asn1_encode.h b/src/lib/krb5/asn.1/asn1_encode.h
index 2acabc2940..79eee48d5f 100644
--- a/src/lib/krb5/asn.1/asn1_encode.h
+++ b/src/lib/krb5/asn.1/asn1_encode.h
@@ -50,7 +50,7 @@
*/
asn1_error_code asn1_encode_integer
- (asn1buf *buf, const long val, unsigned int *retlen);
+ (asn1buf *buf, long val, unsigned int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
effects Inserts the encoding of val into *buf and returns
@@ -59,10 +59,10 @@ asn1_error_code asn1_encode_integer
to expand the buffer. */
asn1_error_code asn1_encode_enumerated
-(asn1buf *buf, const long val, unsigned int *retlen);
+(asn1buf *buf, long val, unsigned int *retlen);
asn1_error_code asn1_encode_unsigned_integer
- (asn1buf *buf, const unsigned long val,
+ (asn1buf *buf, unsigned long val,
unsigned int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
@@ -73,7 +73,7 @@ asn1_error_code asn1_encode_unsigned_integer
asn1_error_code asn1_encode_octetstring
(asn1buf *buf,
- const unsigned int len, const asn1_octet *val,
+ unsigned int len, const asn1_octet *val,
unsigned int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
@@ -84,7 +84,7 @@ asn1_error_code asn1_encode_octetstring
asn1_error_code asn1_encode_oid
(asn1buf *buf,
- const unsigned int len, const asn1_octet *val,
+ unsigned int len, const asn1_octet *val,
unsigned int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
@@ -95,7 +95,7 @@ asn1_error_code asn1_encode_oid
asn1_error_code asn1_encode_charstring
(asn1buf *buf,
- const unsigned int len, const char *val,
+ unsigned int len, const char *val,
unsigned int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
@@ -115,7 +115,7 @@ asn1_error_code asn1_encode_null
asn1_error_code asn1_encode_printablestring
(asn1buf *buf,
- const unsigned int len, const char *val,
+ unsigned int len, const char *val,
int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
@@ -126,7 +126,7 @@ asn1_error_code asn1_encode_printablestring
asn1_error_code asn1_encode_ia5string
(asn1buf *buf,
- const unsigned int len, const char *val,
+ unsigned int len, const char *val,
int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
@@ -136,7 +136,7 @@ asn1_error_code asn1_encode_ia5string
to expand the buffer. */
asn1_error_code asn1_encode_generaltime
- (asn1buf *buf, const time_t val, unsigned int *retlen);
+ (asn1buf *buf, time_t val, unsigned int *retlen);
/* requires *buf is allocated
modifies *buf, *retlen
effects Inserts the encoding of val into *buf and returns
@@ -147,7 +147,7 @@ asn1_error_code asn1_encode_generaltime
asn1_error_code asn1_encode_generalstring
(asn1buf *buf,
- const unsigned int len, const char *val,
+ unsigned int len, const char *val,
unsigned int *retlen);
/* requires *buf is allocated, val has a length of len characters
modifies *buf, *retlen