| 6 | // |
| 7 | // https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 |
| 15 | #ifndef OPENSSL_HEADER_CRYPTO_DSA_INTERNAL_H |
| 16 | #define OPENSSL_HEADER_CRYPTO_DSA_INTERNAL_H |
| 17 |
| 18 | #include <openssl/dsa.h> |
| 19 |
| 20 | #include <openssl/thread.h> |
| 21 |
| 22 | #include "../internal.h" |
| 23 |
| 24 | #if defined(__cplusplus) |
| 25 | extern "C" { |
| 26 | #endif |
| 27 |
| 28 |
| 29 | struct dsa_st { |
| 30 | BIGNUM *p; |
| 31 | BIGNUM *q; |
| 32 | BIGNUM *g; |
| 33 |
| 34 | BIGNUM *pub_key; |
| 35 | BIGNUM *priv_key; |
| 36 |
| 37 | // Normally used to cache montgomery values |
| 38 | CRYPTO_MUTEX method_mont_lock; |
| 39 | BN_MONT_CTX *method_mont_p; |
| 40 | BN_MONT_CTX *method_mont_q; |
| 41 | CRYPTO_refcount_t references; |
| 42 | CRYPTO_EX_DATA ex_data; |
| 43 | }; |
| 44 |
| 45 | // dsa_check_key performs cheap self-checks on |dsa|, and ensures it is within |
| 46 | // DoS bounds. It returns one on success and zero on error. |
| 47 | int dsa_check_key(const DSA *dsa); |
| 48 |
| 49 |
| 50 | #if defined(__cplusplus) |
| 51 | } // extern C |
| 52 | #endif |
| 53 |
| 54 | #endif // OPENSSL_HEADER_CRYPTO_DSA_INTERNAL_H |
| 55 |