summaryrefslogtreecommitdiffstats
path: root/providers/implementations
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-05-01 15:15:02 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-05-02 17:55:07 +1000
commitc450922c8cd8bc7326670fe83e2eb453fea79595 (patch)
treeb6318f11fcc75e2ecb5ef5f6be13a45092fba1a6 /providers/implementations
parente0624f0d702b57e23ecaf5236ce1bafdd85ec649 (diff)
Add solaris assembler fixes for legacy provider
The legacy provider contains assembler references. Most code is automagically pulled in from the libcrypto - but the platform specific assembler functions will not be visible in the symbol table. Copying BNASM and DESASM into liblegacy seems to be a better solution than exposing platform specific function in libcrypto.num. Added a missing call in the des_cbc code for sparc. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11697)
Diffstat (limited to 'providers/implementations')
-rw-r--r--providers/implementations/ciphers/cipher_des_hw.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/providers/implementations/ciphers/cipher_des_hw.c b/providers/implementations/ciphers/cipher_des_hw.c
index 7181c2290c..f52bade45e 100644
--- a/providers/implementations/ciphers/cipher_des_hw.c
+++ b/providers/implementations/ciphers/cipher_des_hw.c
@@ -65,7 +65,13 @@ static int cipher_hw_des_ecb_cipher(PROV_CIPHER_CTX *ctx, unsigned char *out,
static int cipher_hw_des_cbc_cipher(PROV_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, size_t len)
{
- DES_key_schedule *key = &(((PROV_DES_CTX *)ctx)->dks.ks);
+ PROV_DES_CTX *dctx = (PROV_DES_CTX *)ctx;
+ DES_key_schedule *key = &(dctx->dks.ks);
+
+ if (dctx->dstream.cbc != NULL) {
+ (*dctx->dstream.cbc) (in, out, len, key, ctx->iv);
+ return 1;
+ }
while (len >= MAXCHUNK) {
DES_ncbc_encrypt(in, out, MAXCHUNK, key, (DES_cblock *)ctx->iv,