Add a few 'const's
authorBodo Möller <bodo@openssl.org>
Tue, 6 Mar 2001 22:30:03 +0000 (22:30 +0000)
committerBodo Möller <bodo@openssl.org>
Tue, 6 Mar 2001 22:30:03 +0000 (22:30 +0000)
crypto/ec/ec.h
crypto/ec/ec_lcl.h

index 55b174655e92af22295c924c14d2598c23ca83ca..8d4dc833d4325b6909fa791da44a821a1f59912e 100644 (file)
@@ -121,7 +121,7 @@ int EC_POINT_copy(EC_POINT *, const EC_POINT *);
  
 /* TODO: 'set' and 'get' functions for EC_POINTs */
 
  
 /* TODO: 'set' and 'get' functions for EC_POINTs */
 
-size_t EC_POINT_point2oct(const EC_GROUP *, EC_POINT *, point_conversion_form_t form,
+size_t EC_POINT_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form,
         unsigned char *buf, size_t len, BN_CTX *);
 int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *,
         const unsigned char *buf, size_t len, BN_CTX *);
         unsigned char *buf, size_t len, BN_CTX *);
 int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *,
         const unsigned char *buf, size_t len, BN_CTX *);
@@ -129,10 +129,10 @@ int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *,
 int EC_POINT_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
 int EC_POINT_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
 
 int EC_POINT_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
 int EC_POINT_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
 
-int EC_POINT_is_at_infinity(const EC_GROUP *, EC_POINT *);
-int EC_POINT_is_on_curve(const EC_GROUP *, EC_POINT *, BN_CTX *);
+int EC_POINT_is_at_infinity(const EC_GROUP *, const EC_POINT *);
+int EC_POINT_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *);
 
 
-int EC_POINT_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
+int EC_POINT_make_affine(const EC_GROUP *, const EC_POINT *, BN_CTX *);
 
 
 
 
 
 
index a115aaf74f8327119a98548da4ab854deb789b5a..614d885a003f84c7f7f4c751e2969d4f1701d8d8 100644 (file)
@@ -67,7 +67,7 @@ struct ec_method_st {
        /* used by EC_GROUP_new, EC_GROUP_set_GFp, EC_GROUP_free, EC_GROUP_copy: */
        int (*group_init)(EC_GROUP *);
        /* int (*group_set)(EC_GROUP *, .....); */
        /* used by EC_GROUP_new, EC_GROUP_set_GFp, EC_GROUP_free, EC_GROUP_copy: */
        int (*group_init)(EC_GROUP *);
        /* int (*group_set)(EC_GROUP *, .....); */
-       int (*group_set_GFp)(EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *);
+       int (*group_set_GFp)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
        void (*group_finish)(EC_GROUP *);
        int (*group_copy)(EC_GROUP *, const EC_GROUP *);
 
        void (*group_finish)(EC_GROUP *);
        int (*group_copy)(EC_GROUP *, const EC_GROUP *);
 
@@ -86,7 +86,7 @@ struct ec_method_st {
        /* TODO: 'set' and 'get' functions for EC_POINTs */
 
        /* used by EC_POINT_point2oct, EC_POINT_oct2point: */
        /* TODO: 'set' and 'get' functions for EC_POINTs */
 
        /* used by EC_POINT_point2oct, EC_POINT_oct2point: */
-       size_t (*point2oct)(const EC_GROUP *, EC_POINT *, point_conversion_form_t form,
+       size_t (*point2oct)(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form,
                unsigned char *buf, size_t len, BN_CTX *);
        int (*oct2point)(const EC_GROUP *, EC_POINT *,
                const unsigned char *buf, size_t len, BN_CTX *);
                unsigned char *buf, size_t len, BN_CTX *);
        int (*oct2point)(const EC_GROUP *, EC_POINT *,
                const unsigned char *buf, size_t len, BN_CTX *);
@@ -96,9 +96,9 @@ struct ec_method_st {
        int (*dbl)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
 
        /* used by EC_POINT_is_at_infinity, EC_POINT_is_on_curve, EC_POINT_make_affine */
        int (*dbl)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
 
        /* used by EC_POINT_is_at_infinity, EC_POINT_is_on_curve, EC_POINT_make_affine */
-       int (*is_at_infinity)(const EC_GROUP *, EC_POINT *);
-       int (*is_on_curve)(const EC_GROUP *, EC_POINT *, BN_CTX *);
-       int (*make_affine)(const EC_GROUP *, EC_POINT *, BN_CTX *);
+       int (*is_at_infinity)(const EC_GROUP *, const EC_POINT *);
+       int (*is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *);
+       int (*make_affine)(const EC_GROUP *, const EC_POINT *, BN_CTX *);
 
 
        /* internal functions */
 
 
        /* internal functions */