svn rev #22819: trunk/src/lib/crypto/ builtin/hash_provider/ openssl/enc_provider/
tsitkova@MIT.EDU
tsitkova at MIT.EDU
Thu Oct 1 14:39:42 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22819
Commit By: tsitkova
Log Message:
Cleanup
Changed Files:
U trunk/src/lib/crypto/builtin/hash_provider/Makefile.in
U trunk/src/lib/crypto/openssl/enc_provider/des.c
U trunk/src/lib/crypto/openssl/enc_provider/des3.c
U trunk/src/lib/crypto/openssl/enc_provider/rc4.c
Modified: trunk/src/lib/crypto/builtin/hash_provider/Makefile.in
===================================================================
--- trunk/src/lib/crypto/builtin/hash_provider/Makefile.in 2009-10-01 17:01:49 UTC (rev 22818)
+++ trunk/src/lib/crypto/builtin/hash_provider/Makefile.in 2009-10-01 18:39:42 UTC (rev 22819)
@@ -13,14 +13,24 @@
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
-STLIBOBJS= hash_crc32.o hash_md4.o hash_md5.o hash_sha1.o
+CIMPL = @CRYPTO_IMPL@/hash_provider
-OBJS= $(OUTPRE)hash_crc32.$(OBJEXT) $(OUTPRE)hash_md4.$(OBJEXT) \
- $(OUTPRE)hash_md5.$(OBJEXT) $(OUTPRE)hash_sha1.$(OBJEXT)
+STLIBOBJS= \
+ ../../$(CIMPL)/hash_crc32.o \
+ ../../$(CIMPL)/hash_md4.o \
+ ../../$(CIMPL)/hash_md5.o \
+ ../../$(CIMPL)/hash_sha1.o
-SRCS= $(srcdir)/hash_crc32.c $(srcdir)/hash_md4.c \
- $(srcdir)/hash_md5.c $(srcdir)/hash_sha1.c
+OBJS= $(OUTPRE)../../$(CIMPL)/hash_crc32.$(OBJEXT) \
+ $(OUTPRE)../../$(CIMPL)/hash_md4.$(OBJEXT) \
+ $(OUTPRE)../../$(CIMPL)/hash_md5.$(OBJEXT) \
+ $(OUTPRE)../../$(CIMPL)/hash_sha1.$(OBJEXT)
+SRCS= $(srcdir)/../../$(CIMPL)/hash_crc32.c \
+ $(srcdir)/../../$(CIMPL)/hash_md4.c \
+ $(srcdir)/../../$(CIMPL)/hash_md5.c \
+ $(srcdir)/../../$(CIMPL)/hash_sha1.c
+
##DOS##LIBOBJS = $(OBJS)
all-unix:: all-libobjs
Modified: trunk/src/lib/crypto/openssl/enc_provider/des.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/des.c 2009-10-01 17:01:49 UTC (rev 22818)
+++ trunk/src/lib/crypto/openssl/enc_provider/des.c 2009-10-01 18:39:42 UTC (rev 22819)
@@ -35,7 +35,6 @@
for (i = 0, input_length = 0; i < num_data; i++) {
const krb5_crypto_iov *iov = &data[i];
-
if (ENCRYPT_IOV(iov))
input_length += iov->data.length;
}
@@ -54,12 +53,11 @@
k5_des_encrypt(const krb5_keyblock *key, const krb5_data *ivec,
const krb5_data *input, krb5_data *output)
{
- int ret = 0, tmp_len = 0;
- unsigned int tmp_buf_len = 0;
+ int ret = 0, tmp_len = 0;
+ unsigned int tmp_buf_len = 0;
unsigned char *keybuf = NULL;
unsigned char *tmp_buf = NULL;
- unsigned char iv[EVP_MAX_IV_LENGTH];
- EVP_CIPHER_CTX ciph_ctx;
+ EVP_CIPHER_CTX ciph_ctx;
ret = validate(key, ivec, input, output);
if (ret)
@@ -68,11 +66,6 @@
keybuf=key->contents;
keybuf[key->length] = '\0';
- if ( ivec && ivec->data ) {
- memset(iv,0,sizeof(iv));
- memcpy(iv,ivec->data,ivec->length);
- }
-
tmp_buf_len = output->length*2;
tmp_buf=OPENSSL_malloc(tmp_buf_len);
if (!tmp_buf)
@@ -82,13 +75,13 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL, keybuf,
- (ivec && ivec->data) ? iv : NULL);
+ (ivec) ? (unsigned char*)ivec->data : NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
ret = EVP_EncryptUpdate(&ciph_ctx, tmp_buf, &tmp_len,
(unsigned char *)input->data, input->length);
if (!ret || output->length < (unsigned int)tmp_len) {
- return KRB5_CRYPTO_INTERNAL;
+ ret = KRB5_CRYPTO_INTERNAL;
} else {
output->length = tmp_len;
ret = EVP_EncryptFinal_ex(&ciph_ctx, tmp_buf + tmp_len, &tmp_len);
@@ -97,13 +90,13 @@
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
- if (ret)
+ if (ret == 1)
memcpy(output->data,tmp_buf, output->length);
memset(tmp_buf, 0, tmp_buf_len);
OPENSSL_free(tmp_buf);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
}
@@ -114,10 +107,9 @@
const krb5_data *input, krb5_data *output)
{
/* key->enctype was checked by the caller */
- int ret = 0, tmp_len = 0;
+ int ret = 0, tmp_len = 0;
unsigned char *keybuf = NULL;
unsigned char *tmp_buf;
- unsigned char iv[EVP_MAX_IV_LENGTH];
EVP_CIPHER_CTX ciph_ctx;
ret = validate(key, ivec, input, output);
@@ -127,10 +119,6 @@
keybuf=key->contents;
keybuf[key->length] = '\0';
- if ( ivec != NULL && ivec->data ){
- memset(iv,0,sizeof(iv));
- memcpy(iv,ivec->data,ivec->length);
- }
tmp_buf=OPENSSL_malloc(output->length);
if (!tmp_buf)
return ENOMEM;
@@ -139,7 +127,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL, keybuf,
- (ivec && ivec->data) ? iv : NULL);
+ (ivec) ? (unsigned char*)ivec->data : NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
ret = EVP_DecryptUpdate(&ciph_ctx, tmp_buf, &tmp_len,
@@ -152,13 +140,13 @@
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
- if (ret)
+ if (ret == 1)
memcpy(output->data,tmp_buf, output->length);
memset(tmp_buf,0,output->length);
OPENSSL_free(tmp_buf);
- if (!ret)
+ if ( ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
}
@@ -169,21 +157,21 @@
krb5_crypto_iov *data,
size_t num_data)
{
- int ret = 0, tmp_len = MIT_DES_BLOCK_LENGTH;
+ int ret = 0, tmp_len = MIT_DES_BLOCK_LENGTH;
+ int oblock_len = MIT_DES_BLOCK_LENGTH * num_data;
+ unsigned char *iblock = NULL, *oblock = NULL;
+ unsigned char *keybuf = NULL ;
+ struct iov_block_state input_pos, output_pos;
EVP_CIPHER_CTX ciph_ctx;
- unsigned char *keybuf = NULL ;
- unsigned char iv[EVP_MAX_IV_LENGTH];
- struct iov_block_state input_pos, output_pos;
- int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
- unsigned char *iblock, *oblock;
-
iblock = OPENSSL_malloc(MIT_DES_BLOCK_LENGTH);
if (!iblock)
return ENOMEM;
oblock = OPENSSL_malloc(oblock_len);
- if (!oblock)
+ if (!oblock){
+ OPENSSL_free(iblock);
return ENOMEM;
+ }
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
@@ -195,19 +183,18 @@
if (ret)
return ret;
- if (ivec && ivec->data){
- memset(iv,0,sizeof(iv));
- memcpy(iv,ivec->data,ivec->length);
- }
-
memset(oblock, 0, oblock_len);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL,
- keybuf, (ivec && ivec->data) ? iv : NULL);
- if (!ret)
+ keybuf, (ivec && ivec->data) ? (unsigned char*)ivec->data : NULL);
+ if (!ret){
+ EVP_CIPHER_CTX_cleanup(&ciph_ctx);
+ OPENSSL_free(iblock);
+ OPENSSL_free(oblock);
return KRB5_CRYPTO_INTERNAL;
+ }
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -229,11 +216,6 @@
if(ret)
ret = EVP_EncryptFinal_ex(&ciph_ctx, oblock+16, &tmp_len);
- if (ret) {
- if (ivec != NULL)
- memcpy(iv, oblock, MIT_DES_BLOCK_LENGTH);
- }
-
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
memset(iblock,0,sizeof(iblock));
@@ -241,7 +223,7 @@
OPENSSL_free(iblock);
OPENSSL_free(oblock);
- if (!ret)
+ if ( ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
}
@@ -252,21 +234,22 @@
krb5_crypto_iov *data,
size_t num_data)
{
- int ret = 0, tmp_len = MIT_DES_BLOCK_LENGTH;
- EVP_CIPHER_CTX ciph_ctx;
- unsigned char *keybuf = NULL ;
- unsigned char iv[EVP_MAX_IV_LENGTH];
-
+ int ret = 0;
+ int tmp_len = MIT_DES_BLOCK_LENGTH;
+ int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
+ unsigned char *iblock = NULL, *oblock = NULL;
+ unsigned char *keybuf = NULL;
struct iov_block_state input_pos, output_pos;
- int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
- unsigned char *iblock, *oblock;
+ EVP_CIPHER_CTX ciph_ctx;
iblock = OPENSSL_malloc(MIT_DES_BLOCK_LENGTH);
if (!iblock)
return ENOMEM;
oblock = OPENSSL_malloc(oblock_len);
- if (!oblock)
+ if (!oblock){
+ OPENSSL_free(iblock);
return ENOMEM;
+ }
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
@@ -278,19 +261,18 @@
if (ret)
return ret;
- if (ivec && ivec->data){
- memset(iv,0,sizeof(iv));
- memcpy(iv,ivec->data,ivec->length);
- }
-
memset(oblock, 0, oblock_len);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL,
- keybuf, (ivec && ivec->data) ? iv : NULL);
- if (!ret)
+ keybuf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ if (!ret){
+ EVP_CIPHER_CTX_cleanup(&ciph_ctx);
+ OPENSSL_free(iblock);
+ OPENSSL_free(oblock);
return KRB5_CRYPTO_INTERNAL;
+ }
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -315,11 +297,6 @@
if(ret)
ret = EVP_DecryptFinal_ex(&ciph_ctx, oblock+16, &tmp_len);
- if (ret) {
- if (ivec != NULL)
- memcpy(iv, oblock, MIT_DES_BLOCK_LENGTH);
- }
-
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
memset(iblock,0,sizeof(iblock));
@@ -327,7 +304,7 @@
OPENSSL_free(iblock);
OPENSSL_free(oblock);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
}
Modified: trunk/src/lib/crypto/openssl/enc_provider/des3.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/des3.c 2009-10-01 17:01:49 UTC (rev 22818)
+++ trunk/src/lib/crypto/openssl/enc_provider/des3.c 2009-10-01 18:39:42 UTC (rev 22819)
@@ -36,7 +36,6 @@
for (i = 0, input_length = 0; i < num_data; i++) {
const krb5_crypto_iov *iov = &data[i];
-
if (ENCRYPT_IOV(iov))
input_length += iov->data.length;
}
@@ -55,12 +54,11 @@
k5_des3_encrypt(const krb5_keyblock *key, const krb5_data *ivec,
const krb5_data *input, krb5_data *output)
{
- int ret = 0, tmp_len = 0;
- unsigned int tmp_buf_len = 0;
+ int ret = 0, tmp_len = 0;
+ unsigned int tmp_buf_len = 0;
unsigned char *keybuf = NULL;
unsigned char *tmp_buf = NULL;
- unsigned char iv[EVP_MAX_IV_LENGTH];
- EVP_CIPHER_CTX ciph_ctx;
+ EVP_CIPHER_CTX ciph_ctx;
ret = validate(key, ivec, input, output);
if (ret)
@@ -69,9 +67,6 @@
keybuf=key->contents;
keybuf[key->length] = '\0';
- if (ivec && ivec->data) {
- memcpy(iv,ivec->data,ivec->length);
- }
tmp_buf_len = output->length * 2;
tmp_buf = OPENSSL_malloc(tmp_buf_len);
if (!tmp_buf)
@@ -80,7 +75,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL, keybuf,
- (ivec && ivec->data) ? iv : NULL);
+ (ivec) ? (unsigned char*)ivec->data : NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
ret = EVP_EncryptUpdate(&ciph_ctx, tmp_buf, &tmp_len,
@@ -95,12 +90,13 @@
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
- if (ret)
+ if (ret == 1)
memcpy(output->data,tmp_buf, output->length);
+
memset(tmp_buf, 0, tmp_buf_len);
OPENSSL_free(tmp_buf);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
@@ -111,11 +107,11 @@
k5_des3_decrypt(const krb5_keyblock *key, const krb5_data *ivec,
const krb5_data *input, krb5_data *output)
{
- int ret = 0, tmp_len = 0;
- EVP_CIPHER_CTX ciph_ctx;
+ int ret = 0, tmp_len = 0;
+ unsigned int tmp_buf_len = 0;
unsigned char *keybuf = NULL;
unsigned char *tmp_buf = NULL;
- unsigned char iv[EVP_MAX_IV_LENGTH];
+ EVP_CIPHER_CTX ciph_ctx;
ret = validate(key, ivec, input, output);
if (ret)
@@ -124,24 +120,22 @@
keybuf=key->contents;
keybuf[key->length] = '\0';
- if (ivec && ivec->data) {
- memset(iv,0,sizeof(iv));
- memcpy(iv,ivec->data,ivec->length);
- }
-
- tmp_buf=OPENSSL_malloc(output->length);
+ tmp_buf_len = output->length;
+ tmp_buf=OPENSSL_malloc(tmp_buf_len);
if (!tmp_buf)
return ENOMEM;
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL, keybuf,
- (ivec && ivec->data) ? iv: NULL);
+ (ivec) ? (unsigned char*)ivec->data: NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
ret = EVP_DecryptUpdate(&ciph_ctx, tmp_buf, &tmp_len,
(unsigned char *)input->data, input->length);
- if (ret) {
+ if (!ret || output->length < (unsigned int)tmp_len) {
+ ret = KRB5_CRYPTO_INTERNAL;
+ } else {
output->length = tmp_len;
ret = EVP_DecryptFinal_ex(&ciph_ctx, tmp_buf+tmp_len, &tmp_len);
}
@@ -149,13 +143,13 @@
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
- if (ret)
+ if (ret == 1)
memcpy(output->data,tmp_buf, output->length);
- memset(tmp_buf,0,output->length);
+ memset(tmp_buf,0,tmp_buf_len);
OPENSSL_free(tmp_buf);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
@@ -167,14 +161,13 @@
krb5_crypto_iov *data,
size_t num_data)
{
- int ret = 0, tmp_len = MIT_DES_BLOCK_LENGTH;
- EVP_CIPHER_CTX ciph_ctx;
- unsigned char *keybuf = NULL ;
- unsigned char iv[EVP_MAX_IV_LENGTH];
-
+ int ret = 0;
+ int tmp_len = MIT_DES_BLOCK_LENGTH;
+ int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
+ unsigned char *iblock = NULL, *oblock = NULL;
+ unsigned char *keybuf = NULL;
struct iov_block_state input_pos, output_pos;
- int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
- unsigned char *iblock, *oblock;
+ EVP_CIPHER_CTX ciph_ctx;
ret = validate_iov(key, ivec, data, num_data);
if (ret)
@@ -184,8 +177,10 @@
if (!iblock)
return ENOMEM;
oblock = OPENSSL_malloc(oblock_len);
- if (!oblock)
+ if (!oblock){
+ OPENSSL_free(iblock);
return ENOMEM;
+ }
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
@@ -193,19 +188,18 @@
keybuf=key->contents;
keybuf[key->length] = '\0';
- if (ivec && ivec->data){
- memset(iv,0,sizeof(iv));
- memcpy(iv,ivec->data,ivec->length);
- }
-
memset(oblock, 0, oblock_len);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL,
- keybuf, (ivec && ivec->data) ? iv : NULL);
- if (!ret)
+ keybuf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ if (!ret){
+ EVP_CIPHER_CTX_cleanup(&ciph_ctx);
+ OPENSSL_free(iblock);
+ OPENSSL_free(oblock);
return KRB5_CRYPTO_INTERNAL;
+ }
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -229,11 +223,6 @@
if(ret)
ret = EVP_EncryptFinal_ex(&ciph_ctx, oblock+input_pos.data_pos, &tmp_len);
- if (ret) {
- if (ivec != NULL)
- memcpy(iv, oblock, MIT_DES_BLOCK_LENGTH);
- }
-
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
memset(iblock,0,sizeof(iblock));
@@ -241,7 +230,7 @@
OPENSSL_free(iblock);
OPENSSL_free(oblock);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
}
@@ -252,14 +241,13 @@
krb5_crypto_iov *data,
size_t num_data)
{
- int ret = 0, tmp_len = MIT_DES_BLOCK_LENGTH;
- EVP_CIPHER_CTX ciph_ctx;
- unsigned char *keybuf = NULL ;
- unsigned char iv[EVP_MAX_IV_LENGTH];
-
+ int ret = 0;
+ int tmp_len = MIT_DES_BLOCK_LENGTH;
+ int oblock_len = MIT_DES_BLOCK_LENGTH * num_data;
+ unsigned char *iblock = NULL, *oblock = NULL;
+ unsigned char *keybuf = NULL ;
struct iov_block_state input_pos, output_pos;
- int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
- unsigned char *iblock, *oblock;
+ EVP_CIPHER_CTX ciph_ctx;
ret = validate_iov(key, ivec, data, num_data);
if (ret)
@@ -269,8 +257,10 @@
if (!iblock)
return ENOMEM;
oblock = OPENSSL_malloc(oblock_len);
- if (!oblock)
+ if (!oblock){
+ OPENSSL_free(iblock);
return ENOMEM;
+ }
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
@@ -278,19 +268,18 @@
keybuf=key->contents;
keybuf[key->length] = '\0';
- if (ivec && ivec->data){
- memset(iv,0,sizeof(iv));
- memcpy(iv,ivec->data,ivec->length);
- }
-
memset(oblock, 0, oblock_len);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL,
- keybuf, (ivec && ivec->data) ? iv : NULL);
- if (!ret)
+ keybuf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ if (!ret){
+ EVP_CIPHER_CTX_cleanup(&ciph_ctx);
+ OPENSSL_free(iblock);
+ OPENSSL_free(oblock);
return KRB5_CRYPTO_INTERNAL;
+ }
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -315,11 +304,6 @@
ret = EVP_DecryptFinal_ex(&ciph_ctx,
oblock + input_pos.data_pos, &tmp_len);
- if (ret) {
- if (ivec != NULL)
- memcpy(iv, oblock, MIT_DES_BLOCK_LENGTH);
- }
-
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
memset(iblock,0,sizeof(iblock));
@@ -327,7 +311,7 @@
OPENSSL_free(iblock);
OPENSSL_free(oblock);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
return 0;
}
Modified: trunk/src/lib/crypto/openssl/enc_provider/rc4.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/rc4.c 2009-10-01 17:01:49 UTC (rev 22818)
+++ trunk/src/lib/crypto/openssl/enc_provider/rc4.c 2009-10-01 18:39:42 UTC (rev 22819)
@@ -62,7 +62,7 @@
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
output->length += tmp_len;
@@ -90,8 +90,10 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_rc4(), NULL, keybuf, NULL);
- if (!ret)
- return -1;
+ if (!ret){
+ EVP_CIPHER_CTX_cleanup(&ciph_ctx);
+ return KRB5_CRYPTO_INTERNAL;
+ }
for (i = 0; i < num_data; i++) {
iov = &data[i];
@@ -112,7 +114,7 @@
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
- if (!ret)
+ if (ret != 1)
return KRB5_CRYPTO_INTERNAL;
iov->data.length += tmp_len;
More information about the cvs-krb5
mailing list