summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-01-21 11:09:58 +0000
committerMatt Caswell <matt@openssl.org>2015-01-22 09:50:57 +0000
commitc7c7a432df2fb0e0a359d5d383817b1348a71db6 (patch)
treebb78ecc1ddfbe5df8192c7e33f12da61ccfe6aa3 /crypto/evp
parent5ba9d5bb3b79f32506a4fba061368c18890610e4 (diff)
indent has problems with comments that are on the right hand side of a line.
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Conflicts: crypto/bn/bn.h crypto/ec/ec_lcl.h crypto/rsa/rsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl.h ssl/ssl3.h Conflicts: crypto/ec/ec_lcl.h ssl/tls1.h Conflicts: crypto/ec/ecp_nistp224.c crypto/evp/evp.h ssl/d1_both.c ssl/ssl.h ssl/ssl_lib.c Conflicts: crypto/bio/bss_file.c crypto/ec/ec_lcl.h crypto/evp/evp.h crypto/store/str_mem.c crypto/whrlpool/wp_block.c crypto/x509/x509_vfy.h ssl/ssl.h ssl/ssl3.h ssl/ssltest.c ssl/t1_lib.c ssl/tls1.h Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/evp.h65
1 files changed, 44 insertions, 21 deletions
diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h
index 9a0e790403..1f24aff2e7 100644
--- a/crypto/evp/evp.h
+++ b/crypto/evp/evp.h
@@ -260,10 +260,11 @@ typedef struct
void *key;
} EVP_MD_SVCTX;
-#define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single
- * block */
+/* digest can only handle a single block */
+#define EVP_MD_FLAG_ONESHOT 0x0001
-#define EVP_MD_FLAG_FIPS 0x0400 /* Note if suitable for use in FIPS mode */
+/* Note if suitable for use in FIPS mode */
+#define EVP_MD_FLAG_FIPS 0x0400
#define EVP_MD_FLAG_SVCTX 0x0800 /* pass EVP_MD_SVCTX to sign/verify */
@@ -333,19 +334,33 @@ struct evp_cipher_st
{
int nid;
int block_size;
- int key_len; /* Default value for variable length ciphers */
+
+ /* Default value for variable length ciphers */
+ int key_len;
int iv_len;
- unsigned long flags; /* Various flags */
+
+ /* Various flags */
+ unsigned long flags;
+
+ /* init key */
int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key,
- const unsigned char *iv, int enc); /* init key */
+ const unsigned char *iv, int enc);
+
+ /* encrypt/decrypt data */
int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in, unsigned int inl);/* encrypt/decrypt data */
- int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */
- int ctx_size; /* how big ctx->cipher_data needs to be */
- int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */
- int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */
- int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */
- void *app_data; /* Application data */
+ const unsigned char *in, unsigned int inl);
+ /* cleanup ctx */
+ int (*cleanup)(EVP_CIPHER_CTX *);
+ /* how big ctx->cipher_data needs to be */
+ int ctx_size;
+ /* Populate a ASN1_TYPE with parameters */
+ int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *);
+ /* Get parameters from a ASN1_TYPE */
+ int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *);
+ /* Miscellaneous operations */
+ int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr);
+ /* Application data */
+ void *app_data;
} /* EVP_CIPHER */;
/* Values for cipher flags */
@@ -420,14 +435,22 @@ struct evp_cipher_ctx_st
typedef struct evp_Encode_Ctx_st
{
- int num; /* number saved in a partial encode/decode */
- int length; /* The length is either the output line length
- * (in input bytes) or the shortest input line
- * length that is ok. Once decoding begins,
- * the length is adjusted up each time a longer
- * line is decoded */
- unsigned char enc_data[80]; /* data to encode */
- int line_num; /* number read on current line */
+ /* number saved in a partial encode/decode */
+ int num;
+
+ /* The length is either the output line length
+ * (in input bytes) or the shortest input line
+ * length that is ok. Once decoding begins,
+ * the length is adjusted up each time a longer
+ * line is decoded
+ */
+ int length;
+
+ /* data to encode */
+ unsigned char enc_data[80];
+
+ /* number read on current line */
+ int line_num;
int expect_nl;
} EVP_ENCODE_CTX;