Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
openssl_missing.c
Go to the documentation of this file.
1 /*
2  * 'OpenSSL for Ruby' project
3  * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
4  * All rights reserved.
5  */
6 /*
7  * This program is licensed under the same licence as Ruby.
8  * (See the file 'LICENCE'.)
9  */
10 #include RUBY_EXTCONF_H
11 
12 #include <string.h> /* memcpy() */
13 #if !defined(OPENSSL_NO_ENGINE)
14 # include <openssl/engine.h>
15 #endif
16 #include <openssl/x509_vfy.h>
17 
18 #include "openssl_missing.h"
19 
20 /*** added in 1.1.0 ***/
21 #if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
22 void
23 ossl_X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
24  const X509_ALGOR **palg)
25 {
26  if (psig != NULL)
27  *psig = crl->signature;
28  if (palg != NULL)
29  *palg = crl->sig_alg;
30 }
31 #endif
32 
33 #if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
34 void
35 ossl_X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
36  const X509_ALGOR **palg)
37 {
38  if (psig != NULL)
39  *psig = req->signature;
40  if (palg != NULL)
41  *palg = req->sig_alg;
42 }
43 #endif
ossl_X509_CRL_get0_signature
void ossl_X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, const X509_ALGOR **palg)
Definition: openssl_missing.c:23
openssl_missing.h
NULL
#define NULL
Definition: regenc.h:69
ossl_X509_REQ_get0_signature
void ossl_X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, const X509_ALGOR **palg)
Definition: openssl_missing.c:35