|
@@ -13,7 +13,6 @@ Reviewed-by: Matthias St. Pierre <[email protected]>
|
|
Reviewed-by: Richard Levitte <[email protected]>
|
|
Reviewed-by: Richard Levitte <[email protected]>
|
|
(Merged from https://github.com/openssl/openssl/pull/7585)
|
|
(Merged from https://github.com/openssl/openssl/pull/7585)
|
|
|
|
|
|
-diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
|
|
--- a/crypto/engine/eng_devcrypto.c
|
|
--- a/crypto/engine/eng_devcrypto.c
|
|
+++ b/crypto/engine/eng_devcrypto.c
|
|
+++ b/crypto/engine/eng_devcrypto.c
|
|
@@ -16,6 +16,7 @@
|
|
@@ -16,6 +16,7 @@
|
|
@@ -79,7 +78,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
|
|
|
|
/*
|
|
/*
|
|
* Code further down must make sure that only NIDs in the table above
|
|
* Code further down must make sure that only NIDs in the table above
|
|
-@@ -333,19 +367,40 @@ static int cipher_cleanup(EVP_CIPHER_CTX *ctx)
|
|
|
|
|
|
+@@ -333,19 +367,40 @@ static int cipher_cleanup(EVP_CIPHER_CTX
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -185,7 +184,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
static const EVP_CIPHER *get_cipher_method(int nid)
|
|
static const EVP_CIPHER *get_cipher_method(int nid)
|
|
{
|
|
{
|
|
size_t i = get_cipher_data_index(nid);
|
|
size_t i = get_cipher_data_index(nid);
|
|
-@@ -438,6 +520,36 @@ static int devcrypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
|
|
|
|
|
|
+@@ -438,6 +520,36 @@ static int devcrypto_ciphers(ENGINE *e,
|
|
return *cipher != NULL;
|
|
return *cipher != NULL;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -246,7 +245,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
|
|
|
|
/*
|
|
/*
|
|
* Code further down must make sure that only NIDs in the table above
|
|
* Code further down must make sure that only NIDs in the table above
|
|
-@@ -516,8 +637,8 @@ static const struct digest_data_st *get_digest_data(int nid)
|
|
|
|
|
|
+@@ -516,8 +637,8 @@ static const struct digest_data_st *get_
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -257,7 +256,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
*/
|
|
*/
|
|
|
|
|
|
static int digest_init(EVP_MD_CTX *ctx)
|
|
static int digest_init(EVP_MD_CTX *ctx)
|
|
-@@ -630,52 +751,94 @@ static int digest_cleanup(EVP_MD_CTX *ctx)
|
|
|
|
|
|
+@@ -630,52 +751,94 @@ static int digest_cleanup(EVP_MD_CTX *ct
|
|
return clean_devcrypto_session(&digest_ctx->sess);
|
|
return clean_devcrypto_session(&digest_ctx->sess);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -402,7 +401,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-@@ -739,8 +909,154 @@ static int devcrypto_digests(ENGINE *e, const EVP_MD **digest,
|
|
|
|
|
|
+@@ -739,7 +909,153 @@ static int devcrypto_digests(ENGINE *e,
|
|
return *digest != NULL;
|
|
return *digest != NULL;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -478,8 +477,8 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
+ "DIGESTS",
|
|
+ "DIGESTS",
|
|
+ "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]",
|
|
+ "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]",
|
|
+ ENGINE_CMD_FLAG_STRING},
|
|
+ ENGINE_CMD_FLAG_STRING},
|
|
- #endif
|
|
|
|
-
|
|
|
|
|
|
++#endif
|
|
|
|
++
|
|
+ {0, NULL, NULL, 0}
|
|
+ {0, NULL, NULL, 0}
|
|
+};
|
|
+};
|
|
+
|
|
+
|
|
@@ -503,7 +502,7 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
+ use_softdrivers = i;
|
|
+ use_softdrivers = i;
|
|
+#ifdef IMPLEMENT_DIGEST
|
|
+#ifdef IMPLEMENT_DIGEST
|
|
+ rebuild_known_digest_nids(e);
|
|
+ rebuild_known_digest_nids(e);
|
|
-+#endif
|
|
|
|
|
|
+ #endif
|
|
+ rebuild_known_cipher_nids(e);
|
|
+ rebuild_known_cipher_nids(e);
|
|
+ return 1;
|
|
+ return 1;
|
|
+#endif /* CIOCGSESSINFO */
|
|
+#endif /* CIOCGSESSINFO */
|
|
@@ -553,10 +552,9 @@ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
|
|
+ }
|
|
+ }
|
|
+ return 0;
|
|
+ return 0;
|
|
+}
|
|
+}
|
|
-+
|
|
|
|
|
|
+
|
|
/******************************************************************************
|
|
/******************************************************************************
|
|
*
|
|
*
|
|
- * LOAD / UNLOAD
|
|
|
|
@@ -806,6 +1122,8 @@ void engine_load_devcrypto_int()
|
|
@@ -806,6 +1122,8 @@ void engine_load_devcrypto_int()
|
|
|
|
|
|
if (!ENGINE_set_id(e, "devcrypto")
|
|
if (!ENGINE_set_id(e, "devcrypto")
|