Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
openssl-compat.c File Reference
#include "openssl-compat.h"
Include dependency graph for openssl-compat.c:

Go to the source code of this file.

Functions

int RSA_set0_key (RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
 
void RSA_get0_key (const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
 
void RSA_get0_factors (const RSA *r, const BIGNUM **p, const BIGNUM **q)
 
void RSA_get0_crt_params (const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp)
 
int ECDSA_SIG_set0 (ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
 
void ECDSA_SIG_get0 (const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
 
const STACK_OF (X509_EXTENSION)
 
ASN1_OBJECT * X509_EXTENSION_get_object (X509_EXTENSION *ex)
 
ASN1_OCTET_STRING * X509_EXTENSION_get_data (X509_EXTENSION *ex)
 

Function Documentation

◆ ECDSA_SIG_get0()

void ECDSA_SIG_get0 ( const ECDSA_SIG * sig,
const BIGNUM ** pr,
const BIGNUM ** ps )

Definition at line 80 of file openssl-compat.c.

81 {
82 if (pr != NULL) {
83 *pr = sig->r;
84 }
85 if (ps != NULL) {
86 *ps = sig->s;
87 }
88}
Here is the caller graph for this function:

◆ ECDSA_SIG_set0()

int ECDSA_SIG_set0 ( ECDSA_SIG * sig,
BIGNUM * r,
BIGNUM * s )

Definition at line 64 of file openssl-compat.c.

64 {
65 if ((sig->r == NULL && r == NULL) || (sig->s == NULL && s == NULL)) {
66 return 0;
67 }
68
69 if (r != NULL) {
70 BN_free(sig->r);
71 sig->r = r;
72 }
73 if (s != NULL) {
74 BN_free(sig->s);
75 sig->s = s;
76 }
77
78 return 1;
79}
const mie::Vuint & r
Definition bn.cpp:28
char * s
Here is the caller graph for this function:

◆ RSA_get0_crt_params()

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

Definition at line 54 of file openssl-compat.c.

55 {
56 if (dmp1 != NULL)
57 *dmp1 = r->dmp1;
58 if (dmq1 != NULL)
59 *dmq1 = r->dmq1;
60 if (iqmp != NULL)
61 *iqmp = r->iqmp;
62}
Here is the caller graph for this function:

◆ RSA_get0_factors()

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

Definition at line 47 of file openssl-compat.c.

47 {
48 if (p != NULL)
49 *p = r->p;
50 if (q != NULL)
51 *q = r->q;
52}
const mie::Vuint & p
Definition bn.cpp:27
Here is the caller graph for this function:

◆ RSA_get0_key()

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

Definition at line 37 of file openssl-compat.c.

38 {
39 if (n != NULL)
40 *n = r->n;
41 if (e != NULL)
42 *e = r->e;
43 if (d != NULL)
44 *d = r->d;
45}
CK_ULONG d
Here is the caller graph for this function:

◆ RSA_set0_key()

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

Definition at line 13 of file openssl-compat.c.

13 {
14 /* If the fields n and e in r are NULL, the corresponding input
15 * parameters MUST be non-NULL for n and e. d may be
16 * left NULL (in case only the public key is used).
17 */
18 if ((r->n == NULL && n == NULL) || (r->e == NULL && e == NULL))
19 return 0;
20
21 if (n != NULL) {
22 BN_free(r->n);
23 r->n = n;
24 }
25 if (e != NULL) {
26 BN_free(r->e);
27 r->e = e;
28 }
29 if (d != NULL) {
30 BN_free(r->d);
31 r->d = d;
32 }
33
34 return 1;
35}
Here is the caller graph for this function:

◆ STACK_OF()

const STACK_OF ( X509_EXTENSION )

Definition at line 90 of file openssl-compat.c.

90 {
91 return x->cert_info->extensions;
92}
Here is the caller graph for this function:

◆ X509_EXTENSION_get_data()

ASN1_OCTET_STRING * X509_EXTENSION_get_data ( X509_EXTENSION * ex)

Definition at line 97 of file openssl-compat.c.

97 {
98 return ex->value;
99}

◆ X509_EXTENSION_get_object()

ASN1_OBJECT * X509_EXTENSION_get_object ( X509_EXTENSION * ex)

Definition at line 94 of file openssl-compat.c.

94 {
95 return ex->object;
96}