summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-04-07 19:33:28 +0000
committerDr. Stephen Henson <steve@openssl.org>2006-04-07 19:33:28 +0000
commit9e4d0f0be223fa77a802485e5a7c35d2d9b0f00c (patch)
tree223391e9e69c00c4a3de0738ef1a7ca82876816a /crypto
parentcd7638980a2c2b16bb121bcb2ea8cc3cb03afcc1 (diff)
New utility 'pkeyutl' a general purpose version of 'rsautl'.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/ameth_lib.c2
-rw-r--r--crypto/evp/evp.h32
-rw-r--r--crypto/evp/evp_err.c20
-rw-r--r--crypto/evp/evp_locl.h11
-rw-r--r--crypto/evp/pmeth_lib.c2
-rw-r--r--crypto/pem/pem_err.c2
6 files changed, 44 insertions, 25 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c
index 60d159477c..14b5aa335b 100644
--- a/crypto/asn1/ameth_lib.c
+++ b/crypto/asn1/ameth_lib.c
@@ -68,7 +68,7 @@ extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth;
/* Keep this sorted in type order !! */
-const EVP_PKEY_ASN1_METHOD *standard_methods[] =
+static const EVP_PKEY_ASN1_METHOD *standard_methods[] =
{
#ifndef OPENSSL_NO_RSA
&rsa_asn1_meths[0],
diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h
index d16e042c78..d863c737b5 100644
--- a/crypto/evp/evp.h
+++ b/crypto/evp/evp.h
@@ -903,7 +903,16 @@ void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
long arg1, void *arg2));
-
+#define EVP_PKEY_OP_UNDEFINED 0
+#define EVP_PKEY_OP_PARAMGEN 1
+#define EVP_PKEY_OP_KEYGEN 2
+#define EVP_PKEY_OP_SIGN 3
+#define EVP_PKEY_OP_VERIFY 4
+#define EVP_PKEY_OP_VERIFYRECOVER 5
+#define EVP_PKEY_OP_SIGNCTX 6
+#define EVP_PKEY_OP_VERIFYCTX 7
+#define EVP_PKEY_OP_ENCRYPT 8
+#define EVP_PKEY_OP_DECRYPT 9
const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type, ENGINE *e);
EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey);
@@ -912,6 +921,27 @@ int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
int cmd, int p1, void *p2);
+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);
+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);
+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);
+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);
+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);
+
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c
index c3c34b5f14..702331a4a9 100644
--- a/crypto/evp/evp_err.c
+++ b/crypto/evp/evp_err.c
@@ -91,22 +91,22 @@ static ERR_STRING_DATA EVP_str_functs[]=
{ERR_FUNC(EVP_F_EVP_PKEY2PKCS8_BROKEN), "EVP_PKEY2PKCS8_broken"},
{ERR_FUNC(EVP_F_EVP_PKEY_COPY_PARAMETERS), "EVP_PKEY_copy_parameters"},
{ERR_FUNC(EVP_F_EVP_PKEY_CTX_CTRL), "EVP_PKEY_CTX_ctrl"},
-{ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT), "EVP_PKEY_DECRYPT"},
-{ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT_INIT), "EVP_PKEY_DECRYPT_INIT"},
-{ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT), "EVP_PKEY_ENCRYPT"},
-{ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT_INIT), "EVP_PKEY_ENCRYPT_INIT"},
+{ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT), "EVP_PKEY_decrypt"},
+{ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT_INIT), "EVP_PKEY_decrypt_init"},
+{ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT), "EVP_PKEY_encrypt"},
+{ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT_INIT), "EVP_PKEY_encrypt_init"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET1_DH), "EVP_PKEY_get1_DH"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET1_DSA), "EVP_PKEY_get1_DSA"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET1_ECDSA), "EVP_PKEY_GET1_ECDSA"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET1_EC_KEY), "EVP_PKEY_get1_EC_KEY"},
{ERR_FUNC(EVP_F_EVP_PKEY_GET1_RSA), "EVP_PKEY_get1_RSA"},
{ERR_FUNC(EVP_F_EVP_PKEY_NEW), "EVP_PKEY_new"},
-{ERR_FUNC(EVP_F_EVP_PKEY_SIGN), "EVP_PKEY_SIGN"},
-{ERR_FUNC(EVP_F_EVP_PKEY_SIGN_INIT), "EVP_PKEY_SIGN_INIT"},
-{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY), "EVP_PKEY_VERIFY"},
-{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_INIT), "EVP_PKEY_VERIFY_INIT"},
-{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_RECOVER), "EVP_PKEY_VERIFY_RECOVER"},
-{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT), "EVP_PKEY_VERIFY_RECOVER_INIT"},
+{ERR_FUNC(EVP_F_EVP_PKEY_SIGN), "EVP_PKEY_sign"},
+{ERR_FUNC(EVP_F_EVP_PKEY_SIGN_INIT), "EVP_PKEY_sign_init"},
+{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY), "EVP_PKEY_verify"},
+{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_INIT), "EVP_PKEY_verify_init"},
+{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_RECOVER), "EVP_PKEY_verify_recover"},
+{ERR_FUNC(EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT), "EVP_PKEY_verify_recover_init"},
{ERR_FUNC(EVP_F_EVP_RIJNDAEL), "EVP_RIJNDAEL"},
{ERR_FUNC(EVP_F_EVP_SIGNFINAL), "EVP_SignFinal"},
{ERR_FUNC(EVP_F_EVP_VERIFYFINAL), "EVP_VerifyFinal"},
diff --git a/crypto/evp/evp_locl.h b/crypto/evp/evp_locl.h
index 26000ac08b..39930b9669 100644
--- a/crypto/evp/evp_locl.h
+++ b/crypto/evp/evp_locl.h
@@ -248,17 +248,6 @@ struct evp_pkey_ctx_st
void *data;
} /* EVP_PKEY_CTX */;
-#define EVP_PKEY_OP_UNDEFINED 0
-#define EVP_PKEY_OP_PARAMGEN 1
-#define EVP_PKEY_OP_KEYGEN 2
-#define EVP_PKEY_OP_SIGN 3
-#define EVP_PKEY_OP_VERIFY 4
-#define EVP_PKEY_OP_VERIFYRECOVER 5
-#define EVP_PKEY_OP_SIGNCTX 6
-#define EVP_PKEY_OP_VERIFYCTX 7
-#define EVP_PKEY_OP_ENCRYPT 8
-#define EVP_PKEY_OP_DECRYPT 9
-
struct evp_pkey_method_st
{
int pkey_id;
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index 0c0aa9ba53..9ca351a53e 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -68,7 +68,7 @@ STACK *app_pkey_methods = NULL;
extern EVP_PKEY_METHOD rsa_pkey_meth;
-const EVP_PKEY_METHOD *standard_methods[] =
+static const EVP_PKEY_METHOD *standard_methods[] =
{
&rsa_pkey_meth
};
diff --git a/crypto/pem/pem_err.c b/crypto/pem/pem_err.c
index d3352080e1..0de5264aa1 100644
--- a/crypto/pem/pem_err.c
+++ b/crypto/pem/pem_err.c
@@ -98,7 +98,7 @@ static ERR_STRING_DATA PEM_str_functs[]=
{ERR_FUNC(PEM_F_PEM_PK8PKEY), "PEM_PK8PKEY"},
{ERR_FUNC(PEM_F_PEM_READ), "PEM_read"},
{ERR_FUNC(PEM_F_PEM_READ_BIO), "PEM_read_bio"},
-{ERR_FUNC(PEM_F_PEM_READ_BIO_PARAMETERS), "PEM_READ_BIO_PARAMETERS"},
+{ERR_FUNC(PEM_F_PEM_READ_BIO_PARAMETERS), "PEM_read_bio_Parameters"},
{ERR_FUNC(PEM_F_PEM_READ_BIO_PRIVATEKEY), "PEM_READ_BIO_PRIVATEKEY"},
{ERR_FUNC(PEM_F_PEM_READ_PRIVATEKEY), "PEM_READ_PRIVATEKEY"},
{ERR_FUNC(PEM_F_PEM_SEALFINAL), "PEM_SealFinal"},