Fix a bug where we included the IV in the data to decrypt while unwrapping

This commit is contained in:
Nick Thomas
2013-08-08 08:24:55 +01:00
parent 118b7b8125
commit 15fe01c368

View File

@@ -607,7 +607,7 @@ ssize_t rlocs_decrypt( struct rlocs *reg, struct rloc *x, struct rloc *y, unsign
goto fail;
}
if ( !EVP_DecryptUpdate( &entry->ctx, dest, &outl, data, data_len ) ) {
if ( !EVP_DecryptUpdate( &entry->ctx, dest, &outl, data + 16, data_len - 16 ) ) {
warn( "EVP_DecryptUpdate() failed" );
goto fail;
}