pam_pkcs11 0.6.12
pam-pkcs11-ossl-compat.h File Reference
#include <openssl/opensslv.h>
#include <openssl/opensslconf.h>
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/dsa.h>

Go to the source code of this file.

Macros

#define EVP_CIPHER_CTX_new()
 
#define EVP_CIPHER_CTX_free(x)
 
#define EVP_PKEY_base_id(x)
 
#define RSA_PKCS1_OpenSSL   RSA_PKCS1_SSLeay
 
#define OPENSSL_malloc_init   CRYPTO_malloc_init
 
#define EVP_PKEY_get0_RSA(x)
 
#define EVP_PKEY_get0_DSA(x)
 
#define X509_get_extension_flags(x)
 
#define X509_get_key_usage(x)
 
#define X509_get_extended_key_usage(x)
 
#define EVP_MD_CTX_new   EVP_MD_CTX_create
 
#define EVP_MD_CTX_free   EVP_MD_CTX_destroy
 
#define EVP_PKEY_up_ref(user_key)
 
#define X509_up_ref(cert)
 
#define X509_get0_tbs_sigalg(x)
 
#define X509_OBJECT_get0_X509(x)
 
#define X509_OBJECT_get0_X509_CRL(x)
 
#define RSA_get0_e(x)
 
#define RSA_get0_n(x)
 
#define ECDSA_SIG_get0_r(x)
 
#define ECDSA_SIG_get0_s(x)
 
#define X509_OBJECT_free(x)
 
#define pam_pkcs11_ossl_inline
 
#define RSA_bits(R)
 

Functions

static pam_pkcs11_ossl_inline int RSA_set0_key (RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
 
static pam_pkcs11_ossl_inline int RSA_set0_factors (RSA *r, BIGNUM *p, BIGNUM *q)
 
static pam_pkcs11_ossl_inline int RSA_set0_crt_params (RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
 
static pam_pkcs11_ossl_inline void RSA_get0_key (const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
 
static pam_pkcs11_ossl_inline void RSA_get0_factors (const RSA *r, const BIGNUM **p, const BIGNUM **q)
 
static pam_pkcs11_ossl_inline void RSA_get0_crt_params (const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp)
 
static pam_pkcs11_ossl_inline void DSA_get0_pqg (const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g)
 
static pam_pkcs11_ossl_inline void DSA_get0_key (const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key)
 

Macro Definition Documentation

◆ ECDSA_SIG_get0_r

#define ECDSA_SIG_get0_r ( x)
Value:
(x->r)

Definition at line 101 of file pam-pkcs11-ossl-compat.h.

◆ ECDSA_SIG_get0_s

#define ECDSA_SIG_get0_s ( x)
Value:
(x->s)

Definition at line 102 of file pam-pkcs11-ossl-compat.h.

◆ EVP_CIPHER_CTX_free

#define EVP_CIPHER_CTX_free ( x)
Value:
({ \
if (x) { \
EVP_CIPHER_CTX_cleanup(x); \
OPENSSL_free(x); \
} \
})

Definition at line 63 of file pam-pkcs11-ossl-compat.h.

◆ EVP_CIPHER_CTX_new

#define EVP_CIPHER_CTX_new ( )
Value:
({ \
EVP_CIPHER_CTX * tmp = NULL; \
tmp = OPENSSL_malloc(sizeof(struct evp_cipher_ctx_st)); \
if (tmp) { \
EVP_CIPHER_CTX_init(tmp); \
} \
tmp; \
})

Definition at line 54 of file pam-pkcs11-ossl-compat.h.

◆ EVP_MD_CTX_free

#define EVP_MD_CTX_free   EVP_MD_CTX_destroy

Definition at line 93 of file pam-pkcs11-ossl-compat.h.

◆ EVP_MD_CTX_new

#define EVP_MD_CTX_new   EVP_MD_CTX_create

Definition at line 92 of file pam-pkcs11-ossl-compat.h.

◆ EVP_PKEY_base_id

#define EVP_PKEY_base_id ( x)
Value:
(x->type)

Definition at line 80 of file pam-pkcs11-ossl-compat.h.

◆ EVP_PKEY_get0_DSA

#define EVP_PKEY_get0_DSA ( x)
Value:
(x->pkey.dsa)

Definition at line 88 of file pam-pkcs11-ossl-compat.h.

◆ EVP_PKEY_get0_RSA

#define EVP_PKEY_get0_RSA ( x)
Value:
(x->pkey.rsa)

Definition at line 87 of file pam-pkcs11-ossl-compat.h.

◆ EVP_PKEY_up_ref

#define EVP_PKEY_up_ref ( user_key)
Value:
CRYPTO_add(&user_key->references, 1, CRYPTO_LOCK_EVP_PKEY)

Definition at line 94 of file pam-pkcs11-ossl-compat.h.

◆ OPENSSL_malloc_init

#define OPENSSL_malloc_init   CRYPTO_malloc_init

Definition at line 85 of file pam-pkcs11-ossl-compat.h.

◆ pam_pkcs11_ossl_inline

◆ RSA_bits

#define RSA_bits ( R)
Value:
(BN_num_bits(R->n))

Definition at line 141 of file pam-pkcs11-ossl-compat.h.

◆ RSA_get0_e

#define RSA_get0_e ( x)
Value:
(x->e)

Definition at line 99 of file pam-pkcs11-ossl-compat.h.

◆ RSA_get0_n

#define RSA_get0_n ( x)
Value:
(x->n)

Definition at line 100 of file pam-pkcs11-ossl-compat.h.

◆ RSA_PKCS1_OpenSSL

#define RSA_PKCS1_OpenSSL   RSA_PKCS1_SSLeay

Definition at line 84 of file pam-pkcs11-ossl-compat.h.

◆ X509_get0_tbs_sigalg

#define X509_get0_tbs_sigalg ( x)
Value:
(x->cert_info->key->algor)

Definition at line 96 of file pam-pkcs11-ossl-compat.h.

◆ X509_get_extended_key_usage

#define X509_get_extended_key_usage ( x)
Value:
(x->ex_xkusage)

Definition at line 91 of file pam-pkcs11-ossl-compat.h.

◆ X509_get_extension_flags

#define X509_get_extension_flags ( x)
Value:
(x->ex_flags)

Definition at line 89 of file pam-pkcs11-ossl-compat.h.

◆ X509_get_key_usage

#define X509_get_key_usage ( x)
Value:
(x->ex_kusage)

Definition at line 90 of file pam-pkcs11-ossl-compat.h.

◆ X509_OBJECT_free

#define X509_OBJECT_free ( x)
Value:
({ \
if (x) { \
X509_OBJECT_free_contents(x); \
OPENSSL_free(x); \
} \
})

Definition at line 104 of file pam-pkcs11-ossl-compat.h.

◆ X509_OBJECT_get0_X509

#define X509_OBJECT_get0_X509 ( x)
Value:
(x->data.x509)

Definition at line 97 of file pam-pkcs11-ossl-compat.h.

◆ X509_OBJECT_get0_X509_CRL

#define X509_OBJECT_get0_X509_CRL ( x)
Value:
(x->data.crl)

Definition at line 98 of file pam-pkcs11-ossl-compat.h.

◆ X509_up_ref

#define X509_up_ref ( cert)
Value:
CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509)

Definition at line 95 of file pam-pkcs11-ossl-compat.h.

Function Documentation

◆ DSA_get0_key()

static pam_pkcs11_ossl_inline void DSA_get0_key ( const DSA * d,
const BIGNUM ** pub_key,
const BIGNUM ** priv_key )
static

Definition at line 239 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.

◆ DSA_get0_pqg()

static pam_pkcs11_ossl_inline void DSA_get0_pqg ( const DSA * d,
const BIGNUM ** p,
const BIGNUM ** q,
const BIGNUM ** g )
static

Definition at line 229 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.

◆ RSA_get0_crt_params()

static pam_pkcs11_ossl_inline void RSA_get0_crt_params ( const RSA * r,
const BIGNUM ** dmp1,
const BIGNUM ** dmq1,
const BIGNUM ** iqmp )
static

Definition at line 215 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.

◆ RSA_get0_factors()

static pam_pkcs11_ossl_inline void RSA_get0_factors ( const RSA * r,
const BIGNUM ** p,
const BIGNUM ** q )
static

Definition at line 207 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.

◆ RSA_get0_key()

static pam_pkcs11_ossl_inline void RSA_get0_key ( const RSA * r,
const BIGNUM ** n,
const BIGNUM ** e,
const BIGNUM ** d )
static

Definition at line 197 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.

◆ RSA_set0_crt_params()

static pam_pkcs11_ossl_inline int RSA_set0_crt_params ( RSA * r,
BIGNUM * dmp1,
BIGNUM * dmq1,
BIGNUM * iqmp )
static

Definition at line 182 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.

◆ RSA_set0_factors()

static pam_pkcs11_ossl_inline int RSA_set0_factors ( RSA * r,
BIGNUM * p,
BIGNUM * q )
static

Definition at line 169 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.

◆ RSA_set0_key()

static pam_pkcs11_ossl_inline int RSA_set0_key ( RSA * r,
BIGNUM * n,
BIGNUM * e,
BIGNUM * d )
static

Definition at line 153 of file pam-pkcs11-ossl-compat.h.

References pam_pkcs11_ossl_inline.