10#include RUBY_EXTCONF_H
13#if !defined(OPENSSL_NO_ENGINE)
14# include <openssl/engine.h>
16#if !defined(OPENSSL_NO_HMAC)
17# include <openssl/hmac.h>
19#include <openssl/x509_vfy.h>
24#if !defined(OPENSSL_NO_EC)
25#if !defined(HAVE_EC_CURVE_NIST2NID)
30 {
"B-163", NID_sect163r2},
31 {
"B-233", NID_sect233r1},
32 {
"B-283", NID_sect283r1},
33 {
"B-409", NID_sect409r1},
34 {
"B-571", NID_sect571r1},
35 {
"K-163", NID_sect163k1},
36 {
"K-233", NID_sect233k1},
37 {
"K-283", NID_sect283k1},
38 {
"K-409", NID_sect409k1},
39 {
"K-571", NID_sect571k1},
40 {
"P-192", NID_X9_62_prime192v1},
41 {
"P-224", NID_secp224r1},
42 {
"P-256", NID_X9_62_prime256v1},
43 {
"P-384", NID_secp384r1},
44 {
"P-521", NID_secp521r1}
51 for (
i = 0;
i < (
sizeof(nist_curves) /
sizeof(nist_curves[0]));
i++) {
53 return nist_curves[
i].
nid;
61#if !defined(HAVE_HMAC_CTX_NEW)
65 HMAC_CTX *ctx = OPENSSL_malloc(
sizeof(HMAC_CTX));
73#if !defined(HAVE_HMAC_CTX_FREE)
78 HMAC_CTX_cleanup(ctx);
84#if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
87 const X509_ALGOR **palg)
90 *psig = crl->signature;
96#if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
99 const X509_ALGOR **palg)
102 *psig = req->signature;
104 *palg = req->sig_alg;
HMAC_CTX * ossl_HMAC_CTX_new(void)
void ossl_HMAC_CTX_free(HMAC_CTX *ctx)
void ossl_X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, const X509_ALGOR **palg)
void ossl_X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, const X509_ALGOR **palg)
int ossl_EC_curve_nist2nid(const char *name)