Vade retro C++ comments!
(Latin for "comments", anyone?)
This commit is contained in:
parent
3728974460
commit
dbfc0f8c2b
@ -134,7 +134,9 @@ static int asn1_item_print_nm(BIO *out, void *fld, int indent, const ASN1_ITEM *
|
|||||||
int ASN1_template_print(BIO *out, void *fld, int indent, const ASN1_TEMPLATE *tt)
|
int ASN1_template_print(BIO *out, void *fld, int indent, const ASN1_TEMPLATE *tt)
|
||||||
{
|
{
|
||||||
int i, flags;
|
int i, flags;
|
||||||
//if(!fld) return 0;
|
#if 0
|
||||||
|
if(!fld) return 0;
|
||||||
|
#endif
|
||||||
flags = tt->flags;
|
flags = tt->flags;
|
||||||
if(flags & ASN1_TFLG_SK_MASK) {
|
if(flags & ASN1_TFLG_SK_MASK) {
|
||||||
char *tname;
|
char *tname;
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
#include "evp_locl.h"
|
#include "evp_locl.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
// longest key supported in hardware
|
/* longest key supported in hardware */
|
||||||
#define MAX_HW_KEY 24
|
#define MAX_HW_KEY 24
|
||||||
|
|
||||||
static int fd;
|
static int fd;
|
||||||
@ -115,14 +115,14 @@ static int dev_crypto_cleanup(EVP_CIPHER_CTX *ctx)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: there should be some non-fatal way to report we fell back to s/w?
|
/* FIXME: there should be some non-fatal way to report we fell back to s/w? */
|
||||||
static int dev_crypto_des_ede3_init_key(EVP_CIPHER_CTX *ctx,
|
static int dev_crypto_des_ede3_init_key(EVP_CIPHER_CTX *ctx,
|
||||||
const unsigned char *key,
|
const unsigned char *key,
|
||||||
const unsigned char *iv, int enc)
|
const unsigned char *iv, int enc)
|
||||||
{
|
{
|
||||||
if(!dev_crypto_init(ctx))
|
if(!dev_crypto_init(ctx))
|
||||||
{
|
{
|
||||||
// fall back to using software...
|
/* fall back to using software... */
|
||||||
ctx->cipher=EVP_des_ede3_cbc();
|
ctx->cipher=EVP_des_ede3_cbc();
|
||||||
return ctx->cipher->init(ctx,key,iv,enc);
|
return ctx->cipher->init(ctx,key,iv,enc);
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ static int dev_crypto_des_ede3_init_key(EVP_CIPHER_CTX *ctx,
|
|||||||
if (ioctl(fd,CIOCGSESSION,ctx->c.dev_crypto) == -1)
|
if (ioctl(fd,CIOCGSESSION,ctx->c.dev_crypto) == -1)
|
||||||
{
|
{
|
||||||
err("CIOCGSESSION failed");
|
err("CIOCGSESSION failed");
|
||||||
// fall back to using software...
|
/* fall back to using software... */
|
||||||
dev_crypto_cleanup(ctx);
|
dev_crypto_cleanup(ctx);
|
||||||
ctx->cipher=EVP_des_ede3_cbc();
|
ctx->cipher=EVP_des_ede3_cbc();
|
||||||
return ctx->cipher->init(ctx,key,iv,enc);
|
return ctx->cipher->init(ctx,key,iv,enc);
|
||||||
@ -158,7 +158,9 @@ static int dev_crypto_des_ede3_cbc_cipher(EVP_CIPHER_CTX *ctx,
|
|||||||
cryp.ses=ctx->c.dev_crypto->ses;
|
cryp.ses=ctx->c.dev_crypto->ses;
|
||||||
cryp.op=ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT;
|
cryp.op=ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT;
|
||||||
cryp.flags=0;
|
cryp.flags=0;
|
||||||
// cryp.len=((inl+7)/8)*8;
|
#if 0
|
||||||
|
cryp.len=((inl+7)/8)*8;
|
||||||
|
#endif
|
||||||
cryp.len=inl;
|
cryp.len=inl;
|
||||||
assert((inl&7) == 0);
|
assert((inl&7) == 0);
|
||||||
cryp.src=(caddr_t)in;
|
cryp.src=(caddr_t)in;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user