------------------------------------------------------------ revno: 5308 committer: Henrik Ziegeldorf <henrik.ziegeldorf@xxxxxxxxxxxxxx> branch nick: ecc timestamp: Sat 2011-01-08 18:31:53 +0100 message: Const correctness for load_rsa/dsa/ecdsa_private_key(). modified: lib/core/crypto.c lib/core/crypto.h -- lp:~hipl-core/hipl/ecc https://code.launchpad.net/~hipl-core/hipl/ecc Your team HIPL core team is subscribed to branch lp:~hipl-core/hipl/ecc. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/ecc/+edit-subscription
=== modified file 'lib/core/crypto.c' --- lib/core/crypto.c 2011-01-08 17:30:28 +0000 +++ lib/core/crypto.c 2011-01-08 17:31:53 +0000 @@ -1145,7 +1145,7 @@ * *EC contins NULL if the key could not be loaded (not in PEM format * or file not found, etc). */ -int load_ecdsa_private_key(const char *filename, EC_KEY **ecdsa) +int load_ecdsa_private_key(const char *const filename, EC_KEY **ecdsa) { FILE *fp = NULL; int err = 0; @@ -1187,7 +1187,7 @@ * *dsa contins NULL if the key could not be loaded (not in PEM format * or file not found, etc). */ -int load_dsa_private_key(const char *filename, DSA **dsa) +int load_dsa_private_key(const char *const filename, DSA **dsa) { FILE *fp = NULL; int err = 0; @@ -1226,7 +1226,7 @@ * *rsa contains NULL if the key could not be loaded (not in PEM * format or file not found, etc). */ -int load_rsa_private_key(const char *filename, RSA **rsa) +int load_rsa_private_key(const char *const filename, RSA **rsa) { FILE *fp = NULL; int err = 0; === modified file 'lib/core/crypto.h' --- lib/core/crypto.h 2011-01-08 17:19:04 +0000 +++ lib/core/crypto.h 2011-01-08 17:31:53 +0000 @@ -99,9 +99,9 @@ int save_dsa_private_key(const char *const filenamebase, DSA *dsa); int save_rsa_private_key(const char *const filenamebase, RSA *rsa); int save_ecdsa_private_key(const char *const filenamebase, EC_KEY *ecdsa); -int load_dsa_private_key(const char *filenamebase, DSA **dsa); -int load_rsa_private_key(const char *filename, RSA **rsa); -int load_ecdsa_private_key(const char *filename, EC_KEY **ec); +int load_dsa_private_key(const char *const filenamebase, DSA **dsa); +int load_rsa_private_key(const char *const filename, RSA **rsa); +int load_ecdsa_private_key(const char *const filename, EC_KEY **ec); int impl_dsa_sign(const uint8_t *digest, DSA *dsa, uint8_t *signature); int impl_dsa_verify(const uint8_t *digest, DSA *dsa, const uint8_t *const signature); int impl_ecdsa_sign(const uint8_t *digest, EC_KEY *ecdsa, uint8_t *signature);