提交 a58a6368 编写于 作者: D Dr. Stephen Henson

Constification.

上级 9fdab72d
......@@ -931,23 +931,23 @@ int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
unsigned char *sig, int *siglen,
unsigned char *tbs, int tbslen);
const unsigned char *tbs, int tbslen);
int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
unsigned char *sig, int siglen,
unsigned char *tbs, int tbslen);
const unsigned char *sig, int siglen,
const unsigned char *tbs, int tbslen);
int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
unsigned char *rout, int *routlen,
unsigned char *sig, int siglen);
const unsigned char *sig, int siglen);
int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
unsigned char *out, int *outlen,
unsigned char *in, int inlen);
const unsigned char *in, int inlen);
int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
unsigned char *out, int *outlen,
unsigned char *in, int inlen);
const unsigned char *in, int inlen);
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
......
......@@ -264,32 +264,32 @@ struct evp_pkey_method_st
int (*sign_init)(EVP_PKEY_CTX *ctx);
int (*sign)(EVP_PKEY_CTX *ctx, unsigned char *sig, int *siglen,
unsigned char *tbs, int tbslen);
const unsigned char *tbs, int tbslen);
int (*verify_init)(EVP_PKEY_CTX *ctx);
int (*verify)(EVP_PKEY_CTX *ctx, unsigned char *sig, int siglen,
unsigned char *tbs, int tbslen);
int (*verify)(EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen,
const unsigned char *tbs, int tbslen);
int (*verify_recover_init)(EVP_PKEY_CTX *ctx);
int (*verify_recover)(EVP_PKEY_CTX *ctx,
unsigned char *rout, int *routlen,
unsigned char *sig, int siglen);
const unsigned char *sig, int siglen);
int (*signctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx);
int (*signctx)(EVP_PKEY_CTX *ctx, unsigned char *sig, int *siglen,
EVP_MD_CTX *mctx);
int (*verifyctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx);
int (*verifyctx)(EVP_PKEY_CTX *ctx, unsigned char *sig, int siglen,
int (*verifyctx)(EVP_PKEY_CTX *ctx, const unsigned char *sig,int siglen,
EVP_MD_CTX *mctx);
int (*encrypt_init)(EVP_PKEY_CTX *ctx);
int (*encrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, int *outlen,
unsigned char *in, int inlen);
const unsigned char *in, int inlen);
int (*decrypt_init)(EVP_PKEY_CTX *ctx);
int (*decrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, int *outlen,
unsigned char *in, int inlen);
const unsigned char *in, int inlen);
int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2);
int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value);
......
......@@ -83,7 +83,7 @@ int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx)
int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
unsigned char *sig, int *siglen,
unsigned char *tbs, int tbslen)
const unsigned char *tbs, int tbslen)
{
if (!ctx || !ctx->pmeth || !ctx->pmeth->sign)
{
......@@ -118,8 +118,8 @@ int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx)
}
int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
unsigned char *sig, int siglen,
unsigned char *tbs, int tbslen)
const unsigned char *sig, int siglen,
const unsigned char *tbs, int tbslen)
{
if (!ctx || !ctx->pmeth || !ctx->pmeth->verify)
{
......@@ -155,7 +155,7 @@ int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx)
int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
unsigned char *rout, int *routlen,
unsigned char *sig, int siglen)
const unsigned char *sig, int siglen)
{
if (!ctx || !ctx->pmeth || !ctx->pmeth->verify_recover)
{
......@@ -191,7 +191,7 @@ int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx)
int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
unsigned char *out, int *outlen,
unsigned char *in, int inlen)
const unsigned char *in, int inlen)
{
if (!ctx || !ctx->pmeth || !ctx->pmeth->encrypt)
{
......@@ -227,7 +227,7 @@ int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx)
int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
unsigned char *out, int *outlen,
unsigned char *in, int inlen)
const unsigned char *in, int inlen)
{
if (!ctx || !ctx->pmeth || !ctx->pmeth->decrypt)
{
......
......@@ -65,7 +65,7 @@
extern int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
unsigned char *rm, unsigned int *prm_len,
unsigned char *sigbuf, unsigned int siglen,
const unsigned char *sigbuf, unsigned int siglen,
RSA *rsa);
/* RSA pkey context structure */
......@@ -124,7 +124,7 @@ static void pkey_rsa_cleanup(EVP_PKEY_CTX *ctx)
}
static int pkey_rsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, int *siglen,
unsigned char *tbs, int tbslen)
const unsigned char *tbs, int tbslen)
{
int ret;
RSA_PKEY_CTX *rctx = ctx->data;
......@@ -163,7 +163,7 @@ static int pkey_rsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, int *siglen,
static int pkey_rsa_verifyrecover(EVP_PKEY_CTX *ctx,
unsigned char *sig, int *siglen,
unsigned char *tbs, int tbslen)
const unsigned char *tbs, int tbslen)
{
int ret;
RSA_PKEY_CTX *rctx = ctx->data;
......@@ -207,7 +207,7 @@ static int pkey_rsa_verifyrecover(EVP_PKEY_CTX *ctx,
}
static int pkey_rsa_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, int *outlen,
unsigned char *in, int inlen)
const unsigned char *in, int inlen)
{
int ret;
RSA_PKEY_CTX *rctx = ctx->data;
......@@ -220,7 +220,7 @@ static int pkey_rsa_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, int *outlen,
}
static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, int *outlen,
unsigned char *in, int inlen)
const unsigned char *in, int inlen)
{
int ret;
RSA_PKEY_CTX *rctx = ctx->data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册