OpenSSL 1.1.1-pre2
This commit is contained in:
+8
-8
@@ -212,7 +212,7 @@ int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen)
|
||||
}
|
||||
|
||||
*t = '\0';
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void EVP_DecodeInit(EVP_ENCODE_CTX *ctx)
|
||||
@@ -345,7 +345,7 @@ end:
|
||||
/* Legacy behaviour. This should probably rather be zeroed on error. */
|
||||
*outl = ret;
|
||||
ctx->num = n;
|
||||
return (rv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n)
|
||||
@@ -367,7 +367,7 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n)
|
||||
n--;
|
||||
|
||||
if (n % 4 != 0)
|
||||
return (-1);
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < n; i += 4) {
|
||||
a = conv_ascii2bin(*(f++));
|
||||
@@ -375,7 +375,7 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n)
|
||||
c = conv_ascii2bin(*(f++));
|
||||
d = conv_ascii2bin(*(f++));
|
||||
if ((a & 0x80) || (b & 0x80) || (c & 0x80) || (d & 0x80))
|
||||
return (-1);
|
||||
return -1;
|
||||
l = ((((unsigned long)a) << 18L) |
|
||||
(((unsigned long)b) << 12L) |
|
||||
(((unsigned long)c) << 6L) | (((unsigned long)d)));
|
||||
@@ -384,7 +384,7 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n)
|
||||
*(t++) = (unsigned char)(l) & 0xff;
|
||||
ret += 3;
|
||||
}
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl)
|
||||
@@ -395,10 +395,10 @@ int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl)
|
||||
if (ctx->num != 0) {
|
||||
i = EVP_DecodeBlock(out, ctx->enc_data, ctx->num);
|
||||
if (i < 0)
|
||||
return (-1);
|
||||
return -1;
|
||||
ctx->num = 0;
|
||||
*outl = i;
|
||||
return (1);
|
||||
return 1;
|
||||
} else
|
||||
return (1);
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user