X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fppp-des.c;h=94045ec6f57233a4006f013d5000dad02ac10fde;hb=4cb90c1fb141ae3cca08c2ac9c663c14a4d2473e;hp=9c93e9c258debf8c22c917d0ad9fad1591b3071e;hpb=774440c7f0a2b633bae02980927e36ad371604dc;p=ppp.git diff --git a/pppd/ppp-des.c b/pppd/ppp-des.c index 9c93e9c..94045ec 100644 --- a/pppd/ppp-des.c +++ b/pppd/ppp-des.c @@ -142,8 +142,11 @@ static int des_init(PPP_CIPHER_CTX *ctx, const unsigned char *key, const unsigne MakeKey(key, ctx->key); } if (EVP_CipherInit(cc, EVP_des_ecb(), ctx->key, ctx->iv, ctx->is_encr)) { - ctx->priv = cc; - return 1; + + if (EVP_CIPHER_CTX_set_padding(cc, 0)) { + ctx->priv = cc; + return 1; + } } EVP_CIPHER_CTX_free(cc); }