RFC 5649 support.
[openssl.git] / crypto / evp / evp.h
index fcc75e77aaef9b05a54f7a744ff2f22fb85ce8f4..bafe339f06e0706ae2fd8abd7174569417c832d5 100644 (file)
@@ -300,6 +300,12 @@ struct env_md_ctx_st
 #define EVP_MD_CTX_FLAG_PAD_PSS                0x20    /* PSS mode */
 
 #define EVP_MD_CTX_FLAG_NO_INIT                0x0100 /* Don't initialize md_data */
+/* Some functions such as EVP_DigestSign only finalise copies of internal
+ * contexts so additional data can be included after the finalisation call.
+ * This is inefficient if this functionality is not required: it is disabled
+ * if the following flag is set.
+ */
+#define EVP_MD_CTX_FLAG_FINALISE       0x0200
 
 struct evp_cipher_st
        {
@@ -407,6 +413,7 @@ struct evp_cipher_st
 #define                EVP_CTRL_TLS1_1_MULTIBLOCK_AAD  0x19
 #define                EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT      0x1a
 #define                EVP_CTRL_TLS1_1_MULTIBLOCK_DECRYPT      0x1b
+#define                EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE  0x1c
 
 typedef struct {
        unsigned char *out;
@@ -669,7 +676,7 @@ __owur int  EVP_DigestSignFinal(EVP_MD_CTX *ctx,
 __owur int     EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
 __owur int     EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
-                       unsigned char *sig, size_t siglen);
+                       const unsigned char *sig, size_t siglen);
 
 __owur int     EVP_OpenInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
                const unsigned char *ek, int ekl, const unsigned char *iv,
@@ -842,6 +849,7 @@ const EVP_CIPHER *EVP_aes_128_ccm(void);
 const EVP_CIPHER *EVP_aes_128_gcm(void);
 const EVP_CIPHER *EVP_aes_128_xts(void);
 const EVP_CIPHER *EVP_aes_128_wrap(void);
+const EVP_CIPHER *EVP_aes_128_wrap_pad(void);
 const EVP_CIPHER *EVP_aes_192_ecb(void);
 const EVP_CIPHER *EVP_aes_192_cbc(void);
 const EVP_CIPHER *EVP_aes_192_cfb1(void);
@@ -853,6 +861,7 @@ const EVP_CIPHER *EVP_aes_192_ctr(void);
 const EVP_CIPHER *EVP_aes_192_ccm(void);
 const EVP_CIPHER *EVP_aes_192_gcm(void);
 const EVP_CIPHER *EVP_aes_192_wrap(void);
+const EVP_CIPHER *EVP_aes_192_wrap_pad(void);
 const EVP_CIPHER *EVP_aes_256_ecb(void);
 const EVP_CIPHER *EVP_aes_256_cbc(void);
 const EVP_CIPHER *EVP_aes_256_cfb1(void);
@@ -865,6 +874,7 @@ const EVP_CIPHER *EVP_aes_256_ccm(void);
 const EVP_CIPHER *EVP_aes_256_gcm(void);
 const EVP_CIPHER *EVP_aes_256_xts(void);
 const EVP_CIPHER *EVP_aes_256_wrap(void);
+const EVP_CIPHER *EVP_aes_256_wrap_pad(void);
 # if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
@@ -950,6 +960,7 @@ int         EVP_PKEY_type(int type);
 int            EVP_PKEY_id(const EVP_PKEY *pkey);
 int            EVP_PKEY_base_id(const EVP_PKEY *pkey);
 int            EVP_PKEY_bits(EVP_PKEY *pkey);
+int            EVP_PKEY_security_bits(const EVP_PKEY *pkey);
 int            EVP_PKEY_size(EVP_PKEY *pkey);
 int            EVP_PKEY_set_type(EVP_PKEY *pkey,int type);
 int            EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
@@ -1108,6 +1119,9 @@ void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
                int (*pkey_ctrl)(EVP_PKEY *pkey, int op,
                                                        long arg1, void *arg2));
 
+void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth,
+                               int (*pkey_security_bits)(const EVP_PKEY *pk));
+
 
 #define EVP_PKEY_OP_UNDEFINED          0
 #define EVP_PKEY_OP_PARAMGEN           (1<<1)