X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fopenbsd_hw.c;fp=crypto%2Fevp%2Fopenbsd_hw.c;h=dfee5ca2bbf554c8744de9dbf28e505de16c86d7;hp=fe2a721f1741c3c352dd0e68f6276b76e57ef2d2;hb=dbfc0f8c2b2d9f122acc246c67cf1150bf3d144f;hpb=3728974460717c4523d2d81508d8aeb87e7f61b8 diff --git a/crypto/evp/openbsd_hw.c b/crypto/evp/openbsd_hw.c index fe2a721f17..dfee5ca2bb 100644 --- a/crypto/evp/openbsd_hw.c +++ b/crypto/evp/openbsd_hw.c @@ -59,7 +59,7 @@ #include "evp_locl.h" #include -// longest key supported in hardware +/* longest key supported in hardware */ #define MAX_HW_KEY 24 static int fd; @@ -115,14 +115,14 @@ static int dev_crypto_cleanup(EVP_CIPHER_CTX *ctx) 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, const unsigned char *key, const unsigned char *iv, int enc) { if(!dev_crypto_init(ctx)) { - // fall back to using software... + /* fall back to using software... */ ctx->cipher=EVP_des_ede3_cbc(); 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) { err("CIOCGSESSION failed"); - // fall back to using software... + /* fall back to using software... */ dev_crypto_cleanup(ctx); ctx->cipher=EVP_des_ede3_cbc(); 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.op=ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; cryp.flags=0; - // cryp.len=((inl+7)/8)*8; +#if 0 + cryp.len=((inl+7)/8)*8; +#endif cryp.len=inl; assert((inl&7) == 0); cryp.src=(caddr_t)in;