[ruby/openssl] Mark variables and functions as static whenever possible
https://github.com/ruby/openssl/commit/85d6b7f192
This commit is contained in:
parent
cbe7bfd9a8
commit
1df63d9451
@ -355,7 +355,7 @@ ossl_clear_error(void)
|
|||||||
* Any errors you see here are probably due to a bug in Ruby's OpenSSL
|
* Any errors you see here are probably due to a bug in Ruby's OpenSSL
|
||||||
* implementation.
|
* implementation.
|
||||||
*/
|
*/
|
||||||
VALUE
|
static VALUE
|
||||||
ossl_get_errors(VALUE _)
|
ossl_get_errors(VALUE _)
|
||||||
{
|
{
|
||||||
VALUE ary;
|
VALUE ary;
|
||||||
|
@ -163,23 +163,23 @@ VALUE mASN1;
|
|||||||
VALUE eASN1Error;
|
VALUE eASN1Error;
|
||||||
|
|
||||||
VALUE cASN1Data;
|
VALUE cASN1Data;
|
||||||
VALUE cASN1Primitive;
|
static VALUE cASN1Primitive;
|
||||||
VALUE cASN1Constructive;
|
static VALUE cASN1Constructive;
|
||||||
|
|
||||||
VALUE cASN1EndOfContent;
|
static VALUE cASN1EndOfContent;
|
||||||
VALUE cASN1Boolean; /* BOOLEAN */
|
static VALUE cASN1Boolean; /* BOOLEAN */
|
||||||
VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
|
static VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
|
||||||
VALUE cASN1BitString; /* BIT STRING */
|
static VALUE cASN1BitString; /* BIT STRING */
|
||||||
VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */
|
static VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */
|
||||||
VALUE cASN1NumericString, cASN1PrintableString;
|
static VALUE cASN1NumericString, cASN1PrintableString;
|
||||||
VALUE cASN1T61String, cASN1VideotexString;
|
static VALUE cASN1T61String, cASN1VideotexString;
|
||||||
VALUE cASN1IA5String, cASN1GraphicString;
|
static VALUE cASN1IA5String, cASN1GraphicString;
|
||||||
VALUE cASN1ISO64String, cASN1GeneralString;
|
static VALUE cASN1ISO64String, cASN1GeneralString;
|
||||||
VALUE cASN1UniversalString, cASN1BMPString;
|
static VALUE cASN1UniversalString, cASN1BMPString;
|
||||||
VALUE cASN1Null; /* NULL */
|
static VALUE cASN1Null; /* NULL */
|
||||||
VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
|
static VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
|
||||||
VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */
|
static VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */
|
||||||
VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
|
static VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
|
||||||
|
|
||||||
static VALUE sym_IMPLICIT, sym_EXPLICIT;
|
static VALUE sym_IMPLICIT, sym_EXPLICIT;
|
||||||
static VALUE sym_UNIVERSAL, sym_APPLICATION, sym_CONTEXT_SPECIFIC, sym_PRIVATE;
|
static VALUE sym_UNIVERSAL, sym_APPLICATION, sym_CONTEXT_SPECIFIC, sym_PRIVATE;
|
||||||
|
@ -38,24 +38,6 @@ extern VALUE mASN1;
|
|||||||
extern VALUE eASN1Error;
|
extern VALUE eASN1Error;
|
||||||
|
|
||||||
extern VALUE cASN1Data;
|
extern VALUE cASN1Data;
|
||||||
extern VALUE cASN1Primitive;
|
|
||||||
extern VALUE cASN1Constructive;
|
|
||||||
|
|
||||||
extern VALUE cASN1Boolean; /* BOOLEAN */
|
|
||||||
extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
|
|
||||||
extern VALUE cASN1BitString; /* BIT STRING */
|
|
||||||
extern VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */
|
|
||||||
extern VALUE cASN1NumericString, cASN1PrintableString;
|
|
||||||
extern VALUE cASN1T61String, cASN1VideotexString;
|
|
||||||
extern VALUE cASN1IA5String, cASN1GraphicString;
|
|
||||||
extern VALUE cASN1ISO64String, cASN1GeneralString;
|
|
||||||
extern VALUE cASN1UniversalString, cASN1BMPString;
|
|
||||||
extern VALUE cASN1Null; /* NULL */
|
|
||||||
extern VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
|
|
||||||
extern VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */
|
|
||||||
extern VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
|
|
||||||
|
|
||||||
extern VALUE cASN1EndOfContent; /* END OF CONTENT */
|
|
||||||
|
|
||||||
void Init_ossl_asn1(void);
|
void Init_ossl_asn1(void);
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ VALUE cBN;
|
|||||||
*
|
*
|
||||||
* Generic Error for all of OpenSSL::BN (big num)
|
* Generic Error for all of OpenSSL::BN (big num)
|
||||||
*/
|
*/
|
||||||
VALUE eBNError;
|
static VALUE eBNError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Public
|
* Public
|
||||||
@ -152,19 +152,19 @@ ossl_bn_value_ptr(volatile VALUE *ptr)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
||||||
void
|
static void
|
||||||
ossl_bn_ctx_free(void *ptr)
|
ossl_bn_ctx_free(void *ptr)
|
||||||
{
|
{
|
||||||
BN_CTX *ctx = (BN_CTX *)ptr;
|
BN_CTX *ctx = (BN_CTX *)ptr;
|
||||||
BN_CTX_free(ctx);
|
BN_CTX_free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct rb_ractor_local_storage_type ossl_bn_ctx_key_type = {
|
static struct rb_ractor_local_storage_type ossl_bn_ctx_key_type = {
|
||||||
NULL, // mark
|
NULL, // mark
|
||||||
ossl_bn_ctx_free,
|
ossl_bn_ctx_free,
|
||||||
};
|
};
|
||||||
|
|
||||||
rb_ractor_local_key_t ossl_bn_ctx_key;
|
static rb_ractor_local_key_t ossl_bn_ctx_key;
|
||||||
|
|
||||||
BN_CTX *
|
BN_CTX *
|
||||||
ossl_bn_ctx_get(void)
|
ossl_bn_ctx_get(void)
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#define _OSSL_BN_H_
|
#define _OSSL_BN_H_
|
||||||
|
|
||||||
extern VALUE cBN;
|
extern VALUE cBN;
|
||||||
extern VALUE eBNError;
|
|
||||||
|
|
||||||
BN_CTX *ossl_bn_ctx_get(void);
|
BN_CTX *ossl_bn_ctx_get(void);
|
||||||
#define ossl_bn_ctx ossl_bn_ctx_get()
|
#define ossl_bn_ctx ossl_bn_ctx_get()
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cCipher;
|
static VALUE cCipher;
|
||||||
VALUE eCipherError;
|
static VALUE eCipherError;
|
||||||
static ID id_auth_tag_len, id_key_set;
|
static ID id_auth_tag_len, id_key_set;
|
||||||
|
|
||||||
static VALUE ossl_cipher_alloc(VALUE klass);
|
static VALUE ossl_cipher_alloc(VALUE klass);
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
#if !defined(_OSSL_CIPHER_H_)
|
#if !defined(_OSSL_CIPHER_H_)
|
||||||
#define _OSSL_CIPHER_H_
|
#define _OSSL_CIPHER_H_
|
||||||
|
|
||||||
extern VALUE cCipher;
|
|
||||||
extern VALUE eCipherError;
|
|
||||||
|
|
||||||
const EVP_CIPHER *ossl_evp_get_cipherbyname(VALUE);
|
const EVP_CIPHER *ossl_evp_get_cipherbyname(VALUE);
|
||||||
VALUE ossl_cipher_new(const EVP_CIPHER *);
|
VALUE ossl_cipher_new(const EVP_CIPHER *);
|
||||||
void Init_ossl_cipher(void);
|
void Init_ossl_cipher(void);
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cDigest;
|
static VALUE cDigest;
|
||||||
VALUE eDigestError;
|
static VALUE eDigestError;
|
||||||
|
|
||||||
static VALUE ossl_digest_alloc(VALUE klass);
|
static VALUE ossl_digest_alloc(VALUE klass);
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ ossl_digest_alloc(VALUE klass)
|
|||||||
return TypedData_Wrap_Struct(klass, &ossl_digest_type, 0);
|
return TypedData_Wrap_Struct(klass, &ossl_digest_type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE ossl_digest_update(VALUE, VALUE);
|
static VALUE ossl_digest_update(VALUE, VALUE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
@ -225,7 +225,7 @@ ossl_digest_reset(VALUE self)
|
|||||||
* result = digest.digest
|
* result = digest.digest
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
VALUE
|
static VALUE
|
||||||
ossl_digest_update(VALUE self, VALUE data)
|
ossl_digest_update(VALUE self, VALUE data)
|
||||||
{
|
{
|
||||||
EVP_MD_CTX *ctx;
|
EVP_MD_CTX *ctx;
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
#if !defined(_OSSL_DIGEST_H_)
|
#if !defined(_OSSL_DIGEST_H_)
|
||||||
#define _OSSL_DIGEST_H_
|
#define _OSSL_DIGEST_H_
|
||||||
|
|
||||||
extern VALUE cDigest;
|
|
||||||
extern VALUE eDigestError;
|
|
||||||
|
|
||||||
const EVP_MD *ossl_evp_get_digestbyname(VALUE);
|
const EVP_MD *ossl_evp_get_digestbyname(VALUE);
|
||||||
VALUE ossl_digest_new(const EVP_MD *);
|
VALUE ossl_digest_new(const EVP_MD *);
|
||||||
void Init_ossl_digest(void);
|
void Init_ossl_digest(void);
|
||||||
|
@ -37,12 +37,12 @@
|
|||||||
*
|
*
|
||||||
* See also, https://www.openssl.org/docs/crypto/engine.html
|
* See also, https://www.openssl.org/docs/crypto/engine.html
|
||||||
*/
|
*/
|
||||||
VALUE cEngine;
|
static VALUE cEngine;
|
||||||
/* Document-class: OpenSSL::Engine::EngineError
|
/* Document-class: OpenSSL::Engine::EngineError
|
||||||
*
|
*
|
||||||
* This is the generic exception for OpenSSL::Engine related errors
|
* This is the generic exception for OpenSSL::Engine related errors
|
||||||
*/
|
*/
|
||||||
VALUE eEngineError;
|
static VALUE eEngineError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private
|
* Private
|
||||||
|
@ -11,9 +11,6 @@
|
|||||||
#if !defined(OSSL_ENGINE_H)
|
#if !defined(OSSL_ENGINE_H)
|
||||||
#define OSSL_ENGINE_H
|
#define OSSL_ENGINE_H
|
||||||
|
|
||||||
extern VALUE cEngine;
|
|
||||||
extern VALUE eEngineError;
|
|
||||||
|
|
||||||
void Init_ossl_engine(void);
|
void Init_ossl_engine(void);
|
||||||
|
|
||||||
#endif /* OSSL_ENGINE_H */
|
#endif /* OSSL_ENGINE_H */
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cHMAC;
|
static VALUE cHMAC;
|
||||||
VALUE eHMACError;
|
static VALUE eHMACError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Public
|
* Public
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
#if !defined(_OSSL_HMAC_H_)
|
#if !defined(_OSSL_HMAC_H_)
|
||||||
#define _OSSL_HMAC_H_
|
#define _OSSL_HMAC_H_
|
||||||
|
|
||||||
extern VALUE cHMAC;
|
|
||||||
extern VALUE eHMACError;
|
|
||||||
|
|
||||||
void Init_ossl_hmac(void);
|
void Init_ossl_hmac(void);
|
||||||
|
|
||||||
#endif /* _OSSL_HMAC_H_ */
|
#endif /* _OSSL_HMAC_H_ */
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE mNetscape;
|
static VALUE mNetscape;
|
||||||
VALUE cSPKI;
|
static VALUE cSPKI;
|
||||||
VALUE eSPKIError;
|
static VALUE eSPKIError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Public functions
|
* Public functions
|
||||||
|
@ -10,10 +10,6 @@
|
|||||||
#if !defined(_OSSL_NS_SPKI_H_)
|
#if !defined(_OSSL_NS_SPKI_H_)
|
||||||
#define _OSSL_NS_SPKI_H_
|
#define _OSSL_NS_SPKI_H_
|
||||||
|
|
||||||
extern VALUE mNetscape;
|
|
||||||
extern VALUE cSPKI;
|
|
||||||
extern VALUE eSPKIError;
|
|
||||||
|
|
||||||
void Init_ossl_ns_spki(void);
|
void Init_ossl_ns_spki(void);
|
||||||
|
|
||||||
#endif /* _OSSL_NS_SPKI_H_ */
|
#endif /* _OSSL_NS_SPKI_H_ */
|
||||||
|
@ -67,13 +67,13 @@
|
|||||||
if(!(cid)) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
|
if(!(cid)) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
VALUE mOCSP;
|
static VALUE mOCSP;
|
||||||
VALUE eOCSPError;
|
static VALUE eOCSPError;
|
||||||
VALUE cOCSPReq;
|
static VALUE cOCSPReq;
|
||||||
VALUE cOCSPRes;
|
static VALUE cOCSPRes;
|
||||||
VALUE cOCSPBasicRes;
|
static VALUE cOCSPBasicRes;
|
||||||
VALUE cOCSPSingleRes;
|
static VALUE cOCSPSingleRes;
|
||||||
VALUE cOCSPCertId;
|
static VALUE cOCSPCertId;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_ocsp_request_free(void *ptr)
|
ossl_ocsp_request_free(void *ptr)
|
||||||
|
@ -11,13 +11,6 @@
|
|||||||
#if !defined(_OSSL_OCSP_H_)
|
#if !defined(_OSSL_OCSP_H_)
|
||||||
#define _OSSL_OCSP_H_
|
#define _OSSL_OCSP_H_
|
||||||
|
|
||||||
#if !defined(OPENSSL_NO_OCSP)
|
|
||||||
extern VALUE mOCSP;
|
|
||||||
extern VALUE cOCSPReq;
|
|
||||||
extern VALUE cOCSPRes;
|
|
||||||
extern VALUE cOCSPBasicRes;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void Init_ossl_ocsp(void);
|
void Init_ossl_ocsp(void);
|
||||||
|
|
||||||
#endif /* _OSSL_OCSP_H_ */
|
#endif /* _OSSL_OCSP_H_ */
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cPKCS12;
|
static VALUE cPKCS12;
|
||||||
VALUE ePKCS12Error;
|
static VALUE ePKCS12Error;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private
|
* Private
|
||||||
|
@ -5,9 +5,6 @@
|
|||||||
#if !defined(_OSSL_PKCS12_H_)
|
#if !defined(_OSSL_PKCS12_H_)
|
||||||
#define _OSSL_PKCS12_H_
|
#define _OSSL_PKCS12_H_
|
||||||
|
|
||||||
extern VALUE cPKCS12;
|
|
||||||
extern VALUE ePKCS12Error;
|
|
||||||
|
|
||||||
void Init_ossl_pkcs12(void);
|
void Init_ossl_pkcs12(void);
|
||||||
|
|
||||||
#endif /* _OSSL_PKCS12_H_ */
|
#endif /* _OSSL_PKCS12_H_ */
|
||||||
|
@ -53,35 +53,24 @@ void Init_ossl_pkey(void);
|
|||||||
* RSA
|
* RSA
|
||||||
*/
|
*/
|
||||||
extern VALUE cRSA;
|
extern VALUE cRSA;
|
||||||
extern VALUE eRSAError;
|
|
||||||
|
|
||||||
void Init_ossl_rsa(void);
|
void Init_ossl_rsa(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DSA
|
* DSA
|
||||||
*/
|
*/
|
||||||
extern VALUE cDSA;
|
extern VALUE cDSA;
|
||||||
extern VALUE eDSAError;
|
|
||||||
|
|
||||||
void Init_ossl_dsa(void);
|
void Init_ossl_dsa(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DH
|
* DH
|
||||||
*/
|
*/
|
||||||
extern VALUE cDH;
|
extern VALUE cDH;
|
||||||
extern VALUE eDHError;
|
|
||||||
|
|
||||||
void Init_ossl_dh(void);
|
void Init_ossl_dh(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* EC
|
* EC
|
||||||
*/
|
*/
|
||||||
extern VALUE cEC;
|
extern VALUE cEC;
|
||||||
extern VALUE eECError;
|
|
||||||
extern VALUE cEC_GROUP;
|
|
||||||
extern VALUE eEC_GROUP;
|
|
||||||
extern VALUE cEC_POINT;
|
|
||||||
extern VALUE eEC_POINT;
|
|
||||||
VALUE ossl_ec_new(EVP_PKEY *);
|
VALUE ossl_ec_new(EVP_PKEY *);
|
||||||
void Init_ossl_ec(void);
|
void Init_ossl_ec(void);
|
||||||
|
|
||||||
@ -136,7 +125,7 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2, VALU
|
|||||||
BN_clear_free(bn1); \
|
BN_clear_free(bn1); \
|
||||||
BN_clear_free(bn2); \
|
BN_clear_free(bn2); \
|
||||||
BN_clear_free(bn3); \
|
BN_clear_free(bn3); \
|
||||||
ossl_raise(eBNError, NULL); \
|
ossl_raise(ePKeyError, "BN_dup"); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
if (!_type##_set0_##_group(obj, bn1, bn2, bn3)) { \
|
if (!_type##_set0_##_group(obj, bn1, bn2, bn3)) { \
|
||||||
@ -164,7 +153,7 @@ static VALUE ossl_##_keytype##_set_##_group(VALUE self, VALUE v1, VALUE v2) \
|
|||||||
(orig_bn2 && !(bn2 = BN_dup(orig_bn2)))) { \
|
(orig_bn2 && !(bn2 = BN_dup(orig_bn2)))) { \
|
||||||
BN_clear_free(bn1); \
|
BN_clear_free(bn1); \
|
||||||
BN_clear_free(bn2); \
|
BN_clear_free(bn2); \
|
||||||
ossl_raise(eBNError, NULL); \
|
ossl_raise(ePKeyError, "BN_dup"); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
if (!_type##_set0_##_group(obj, bn1, bn2)) { \
|
if (!_type##_set0_##_group(obj, bn1, bn2)) { \
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cDH;
|
VALUE cDH;
|
||||||
VALUE eDHError;
|
static VALUE eDHError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private
|
* Private
|
||||||
|
@ -41,7 +41,7 @@ DSA_PRIVATE(VALUE obj, OSSL_3_const DSA *dsa)
|
|||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cDSA;
|
VALUE cDSA;
|
||||||
VALUE eDSAError;
|
static VALUE eDSAError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private
|
* Private
|
||||||
|
@ -41,11 +41,11 @@ static const rb_data_type_t ossl_ec_point_type;
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
VALUE cEC;
|
VALUE cEC;
|
||||||
VALUE eECError;
|
static VALUE eECError;
|
||||||
VALUE cEC_GROUP;
|
static VALUE cEC_GROUP;
|
||||||
VALUE eEC_GROUP;
|
static VALUE eEC_GROUP;
|
||||||
VALUE cEC_POINT;
|
static VALUE cEC_POINT;
|
||||||
VALUE eEC_POINT;
|
static VALUE eEC_POINT;
|
||||||
|
|
||||||
static ID s_GFp, s_GF2m;
|
static ID s_GFp, s_GF2m;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ RSA_PRIVATE(VALUE obj, OSSL_3_const RSA *rsa)
|
|||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cRSA;
|
VALUE cRSA;
|
||||||
VALUE eRSAError;
|
static VALUE eRSAError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private
|
* Private
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "ossl.h"
|
#include "ossl.h"
|
||||||
|
|
||||||
VALUE mRandom;
|
static VALUE mRandom;
|
||||||
VALUE eRandomError;
|
static VALUE eRandomError;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
#if !defined(_OSSL_RAND_H_)
|
#if !defined(_OSSL_RAND_H_)
|
||||||
#define _OSSL_RAND_H_
|
#define _OSSL_RAND_H_
|
||||||
|
|
||||||
extern VALUE mRandom;
|
|
||||||
extern VALUE eRandomError;
|
|
||||||
|
|
||||||
void Init_ossl_rand(void);
|
void Init_ossl_rand(void);
|
||||||
|
|
||||||
#endif /* _OSSL_RAND_H_ */
|
#endif /* _OSSL_RAND_H_ */
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
VALUE mSSL;
|
VALUE mSSL;
|
||||||
static VALUE eSSLError;
|
static VALUE eSSLError;
|
||||||
VALUE cSSLContext;
|
static VALUE cSSLContext;
|
||||||
VALUE cSSLSocket;
|
VALUE cSSLSocket;
|
||||||
|
|
||||||
static VALUE eSSLErrorWaitReadable;
|
static VALUE eSSLErrorWaitReadable;
|
||||||
|
@ -28,7 +28,6 @@ void Init_ossl_x509(void);
|
|||||||
* X509Attr
|
* X509Attr
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509Attr;
|
extern VALUE cX509Attr;
|
||||||
extern VALUE eX509AttrError;
|
|
||||||
|
|
||||||
VALUE ossl_x509attr_new(X509_ATTRIBUTE *);
|
VALUE ossl_x509attr_new(X509_ATTRIBUTE *);
|
||||||
X509_ATTRIBUTE *GetX509AttrPtr(VALUE);
|
X509_ATTRIBUTE *GetX509AttrPtr(VALUE);
|
||||||
@ -38,7 +37,6 @@ void Init_ossl_x509attr(void);
|
|||||||
* X509Cert
|
* X509Cert
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509Cert;
|
extern VALUE cX509Cert;
|
||||||
extern VALUE eX509CertError;
|
|
||||||
|
|
||||||
VALUE ossl_x509_new(X509 *);
|
VALUE ossl_x509_new(X509 *);
|
||||||
X509 *GetX509CertPtr(VALUE);
|
X509 *GetX509CertPtr(VALUE);
|
||||||
@ -48,9 +46,6 @@ void Init_ossl_x509cert(void);
|
|||||||
/*
|
/*
|
||||||
* X509CRL
|
* X509CRL
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509CRL;
|
|
||||||
extern VALUE eX509CRLError;
|
|
||||||
|
|
||||||
VALUE ossl_x509crl_new(X509_CRL *);
|
VALUE ossl_x509crl_new(X509_CRL *);
|
||||||
X509_CRL *GetX509CRLPtr(VALUE);
|
X509_CRL *GetX509CRLPtr(VALUE);
|
||||||
void Init_ossl_x509crl(void);
|
void Init_ossl_x509crl(void);
|
||||||
@ -59,8 +54,6 @@ void Init_ossl_x509crl(void);
|
|||||||
* X509Extension
|
* X509Extension
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509Ext;
|
extern VALUE cX509Ext;
|
||||||
extern VALUE cX509ExtFactory;
|
|
||||||
extern VALUE eX509ExtError;
|
|
||||||
|
|
||||||
VALUE ossl_x509ext_new(X509_EXTENSION *);
|
VALUE ossl_x509ext_new(X509_EXTENSION *);
|
||||||
X509_EXTENSION *GetX509ExtPtr(VALUE);
|
X509_EXTENSION *GetX509ExtPtr(VALUE);
|
||||||
@ -69,9 +62,6 @@ void Init_ossl_x509ext(void);
|
|||||||
/*
|
/*
|
||||||
* X509Name
|
* X509Name
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509Name;
|
|
||||||
extern VALUE eX509NameError;
|
|
||||||
|
|
||||||
VALUE ossl_x509name_new(X509_NAME *);
|
VALUE ossl_x509name_new(X509_NAME *);
|
||||||
X509_NAME *GetX509NamePtr(VALUE);
|
X509_NAME *GetX509NamePtr(VALUE);
|
||||||
void Init_ossl_x509name(void);
|
void Init_ossl_x509name(void);
|
||||||
@ -79,9 +69,6 @@ void Init_ossl_x509name(void);
|
|||||||
/*
|
/*
|
||||||
* X509Request
|
* X509Request
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509Req;
|
|
||||||
extern VALUE eX509ReqError;
|
|
||||||
|
|
||||||
X509_REQ *GetX509ReqPtr(VALUE);
|
X509_REQ *GetX509ReqPtr(VALUE);
|
||||||
void Init_ossl_x509req(void);
|
void Init_ossl_x509req(void);
|
||||||
|
|
||||||
@ -89,7 +76,6 @@ void Init_ossl_x509req(void);
|
|||||||
* X509Revoked
|
* X509Revoked
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509Rev;
|
extern VALUE cX509Rev;
|
||||||
extern VALUE eX509RevError;
|
|
||||||
|
|
||||||
VALUE ossl_x509revoked_new(X509_REVOKED *);
|
VALUE ossl_x509revoked_new(X509_REVOKED *);
|
||||||
X509_REVOKED *DupX509RevokedPtr(VALUE);
|
X509_REVOKED *DupX509RevokedPtr(VALUE);
|
||||||
@ -98,12 +84,7 @@ void Init_ossl_x509revoked(void);
|
|||||||
/*
|
/*
|
||||||
* X509Store and X509StoreContext
|
* X509Store and X509StoreContext
|
||||||
*/
|
*/
|
||||||
extern VALUE cX509Store;
|
|
||||||
extern VALUE cX509StoreContext;
|
|
||||||
extern VALUE eX509StoreError;
|
|
||||||
|
|
||||||
X509_STORE *GetX509StorePtr(VALUE);
|
X509_STORE *GetX509StorePtr(VALUE);
|
||||||
|
|
||||||
void Init_ossl_x509store(void);
|
void Init_ossl_x509store(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509Attr;
|
VALUE cX509Attr;
|
||||||
VALUE eX509AttrError;
|
static VALUE eX509AttrError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509attr_free(void *ptr)
|
ossl_x509attr_free(void *ptr)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509Cert;
|
VALUE cX509Cert;
|
||||||
VALUE eX509CertError;
|
static VALUE eX509CertError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509_free(void *ptr)
|
ossl_x509_free(void *ptr)
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509CRL;
|
static VALUE cX509CRL;
|
||||||
VALUE eX509CRLError;
|
static VALUE eX509CRLError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509crl_free(void *ptr)
|
ossl_x509crl_free(void *ptr)
|
||||||
|
@ -41,8 +41,8 @@
|
|||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509Ext;
|
VALUE cX509Ext;
|
||||||
VALUE cX509ExtFactory;
|
static VALUE cX509ExtFactory;
|
||||||
VALUE eX509ExtError;
|
static VALUE eX509ExtError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509ext_free(void *ptr)
|
ossl_x509ext_free(void *ptr)
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509Name;
|
static VALUE cX509Name;
|
||||||
VALUE eX509NameError;
|
static VALUE eX509NameError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509name_free(void *ptr)
|
ossl_x509name_free(void *ptr)
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509Req;
|
static VALUE cX509Req;
|
||||||
VALUE eX509ReqError;
|
static VALUE eX509ReqError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509req_free(void *ptr)
|
ossl_x509req_free(void *ptr)
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509Rev;
|
VALUE cX509Rev;
|
||||||
VALUE eX509RevError;
|
static VALUE eX509RevError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509rev_free(void *ptr)
|
ossl_x509rev_free(void *ptr)
|
||||||
|
@ -108,9 +108,9 @@ ossl_verify_cb_call(VALUE proc, int ok, X509_STORE_CTX *ctx)
|
|||||||
/*
|
/*
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
VALUE cX509Store;
|
static VALUE cX509Store;
|
||||||
VALUE cX509StoreContext;
|
static VALUE cX509StoreContext;
|
||||||
VALUE eX509StoreError;
|
static VALUE eX509StoreError;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ossl_x509store_mark(void *ptr)
|
ossl_x509store_mark(void *ptr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user