From: Krzysztof Jackiewicz Date: Wed, 31 Aug 2016 09:21:43 +0000 (+0200) Subject: Convert yaca_padding_e to value acceptable by OpenSSL X-Git-Tag: accepted/tizen/common/20160901.143419~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82e1e35684291484185420b5457c91bc21cdea17;p=platform%2Fcore%2Fsecurity%2Fyaca.git Convert yaca_padding_e to value acceptable by OpenSSL Change-Id: I771de0745f9779c6058199e7edc0edc858dd6d3c --- diff --git a/src/encrypt.c b/src/encrypt.c index 10400a4..537fe42 100644 --- a/src/encrypt.c +++ b/src/encrypt.c @@ -746,7 +746,7 @@ int set_encrypt_property(yaca_context_h ctx, c->state == STATE_FINALIZED) return YACA_ERROR_INVALID_PARAMETER; - yaca_padding_e padding = *(yaca_padding_e*)value; + int padding = *(yaca_padding_e*)value == YACA_PADDING_NONE ? 0 : 1; if (EVP_CIPHER_CTX_set_padding(c->cipher_ctx, padding) != 1) { ERROR_DUMP(YACA_ERROR_INTERNAL); return YACA_ERROR_INTERNAL;