Skip to content

CryptoTransformImpl::setPadding wrong call #3204

@micheleselea

Description

@micheleselea

I think there's a mistake in setPadding function is coded like:

	int CryptoTransformImpl::setPadding(int padding)
	{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
		return EVP_CIPHER_CTX_block_size(_pContext);
#else
		return EVP_CIPHER_CTX_set_padding(&_context, padding);
#endif
	}

I think should be:

int CryptoTransformImpl::setPadding(int padding)
	{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
		return EVP_CIPHER_CTX_set_padding(_pContext, padding);
#else
		return EVP_CIPHER_CTX_set_padding(&_context, padding);
#endif
	}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions