cmp.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /*
  2. * Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
  3. * Copyright Nokia 2007-2019
  4. * Copyright Siemens AG 2015-2019
  5. *
  6. * Licensed under the Apache License 2.0 (the "License"). You may not use
  7. * this file except in compliance with the License. You can obtain a copy
  8. * in the file LICENSE in the source distribution or at
  9. * https://www.openssl.org/source/license.html
  10. */
  11. #ifndef OPENSSL_CMP_H
  12. # define OPENSSL_CMP_H
  13. # include <openssl/opensslconf.h>
  14. # ifndef OPENSSL_NO_CMP
  15. # include <openssl/crmf.h>
  16. # include <openssl/cmperr.h>
  17. # include <openssl/cmp_util.h>
  18. # include <openssl/http.h>
  19. /* explicit #includes not strictly needed since implied by the above: */
  20. # include <openssl/types.h>
  21. # include <openssl/safestack.h>
  22. # include <openssl/x509.h>
  23. # include <openssl/x509v3.h>
  24. # ifdef __cplusplus
  25. extern "C" {
  26. # endif
  27. # define OSSL_CMP_PVNO 2
  28. /*-
  29. * PKIFailureInfo ::= BIT STRING {
  30. * -- since we can fail in more than one way!
  31. * -- More codes may be added in the future if/when required.
  32. * badAlg (0),
  33. * -- unrecognized or unsupported Algorithm Identifier
  34. * badMessageCheck (1),
  35. * -- integrity check failed (e.g., signature did not verify)
  36. * badRequest (2),
  37. * -- transaction not permitted or supported
  38. * badTime (3),
  39. * -- messageTime was not sufficiently close to the system time,
  40. * -- as defined by local policy
  41. * badCertId (4),
  42. * -- no certificate could be found matching the provided criteria
  43. * badDataFormat (5),
  44. * -- the data submitted has the wrong format
  45. * wrongAuthority (6),
  46. * -- the authority indicated in the request is different from the
  47. * -- one creating the response token
  48. * incorrectData (7),
  49. * -- the requester's data is incorrect (for notary services)
  50. * missingTimeStamp (8),
  51. * -- when the timestamp is missing but should be there
  52. * -- (by policy)
  53. * badPOP (9),
  54. * -- the proof-of-possession failed
  55. * certRevoked (10),
  56. * -- the certificate has already been revoked
  57. * certConfirmed (11),
  58. * -- the certificate has already been confirmed
  59. * wrongIntegrity (12),
  60. * -- invalid integrity, password based instead of signature or
  61. * -- vice versa
  62. * badRecipientNonce (13),
  63. * -- invalid recipient nonce, either missing or wrong value
  64. * timeNotAvailable (14),
  65. * -- the TSA's time source is not available
  66. * unacceptedPolicy (15),
  67. * -- the requested TSA policy is not supported by the TSA.
  68. * unacceptedExtension (16),
  69. * -- the requested extension is not supported by the TSA.
  70. * addInfoNotAvailable (17),
  71. * -- the additional information requested could not be
  72. * -- understood or is not available
  73. * badSenderNonce (18),
  74. * -- invalid sender nonce, either missing or wrong size
  75. * badCertTemplate (19),
  76. * -- invalid cert. template or missing mandatory information
  77. * signerNotTrusted (20),
  78. * -- signer of the message unknown or not trusted
  79. * transactionIdInUse (21),
  80. * -- the transaction identifier is already in use
  81. * unsupportedVersion (22),
  82. * -- the version of the message is not supported
  83. * notAuthorized (23),
  84. * -- the sender was not authorized to make the preceding
  85. * -- request or perform the preceding action
  86. * systemUnavail (24),
  87. * -- the request cannot be handled due to system unavailability
  88. * systemFailure (25),
  89. * -- the request cannot be handled due to system failure
  90. * duplicateCertReq (26)
  91. * -- certificate cannot be issued because a duplicate
  92. * -- certificate already exists
  93. * }
  94. */
  95. # define OSSL_CMP_PKIFAILUREINFO_badAlg 0
  96. # define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
  97. # define OSSL_CMP_PKIFAILUREINFO_badRequest 2
  98. # define OSSL_CMP_PKIFAILUREINFO_badTime 3
  99. # define OSSL_CMP_PKIFAILUREINFO_badCertId 4
  100. # define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
  101. # define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
  102. # define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
  103. # define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
  104. # define OSSL_CMP_PKIFAILUREINFO_badPOP 9
  105. # define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
  106. # define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
  107. # define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
  108. # define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
  109. # define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
  110. # define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
  111. # define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
  112. # define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
  113. # define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
  114. # define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
  115. # define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
  116. # define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
  117. # define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
  118. # define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
  119. # define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
  120. # define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
  121. # define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
  122. # define OSSL_CMP_PKIFAILUREINFO_MAX 26
  123. # define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
  124. ( (1<<(OSSL_CMP_PKIFAILUREINFO_MAX+1)) - 1)
  125. # if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
  126. # error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
  127. # endif
  128. typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
  129. # define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
  130. # define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
  131. # define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
  132. # define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
  133. # define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
  134. # define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
  135. # define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
  136. # define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
  137. # define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
  138. # define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
  139. # define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
  140. # define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
  141. # define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
  142. # define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
  143. # define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
  144. # define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
  145. # define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
  146. # define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
  147. # define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
  148. # define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
  149. # define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
  150. # define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
  151. # define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
  152. # define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
  153. # define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
  154. # define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
  155. # define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
  156. /*-
  157. * PKIStatus ::= INTEGER {
  158. * accepted (0),
  159. * -- you got exactly what you asked for
  160. * grantedWithMods (1),
  161. * -- you got something like what you asked for; the
  162. * -- requester is responsible for ascertaining the differences
  163. * rejection (2),
  164. * -- you don't get it, more information elsewhere in the message
  165. * waiting (3),
  166. * -- the request body part has not yet been processed; expect to
  167. * -- hear more later (note: proper handling of this status
  168. * -- response MAY use the polling req/rep PKIMessages specified
  169. * -- in Section 5.3.22; alternatively, polling in the underlying
  170. * -- transport layer MAY have some utility in this regard)
  171. * revocationWarning (4),
  172. * -- this message contains a warning that a revocation is
  173. * -- imminent
  174. * revocationNotification (5),
  175. * -- notification that a revocation has occurred
  176. * keyUpdateWarning (6)
  177. * -- update already done for the oldCertId specified in
  178. * -- CertReqMsg
  179. * }
  180. */
  181. # define OSSL_CMP_PKISTATUS_accepted 0
  182. # define OSSL_CMP_PKISTATUS_grantedWithMods 1
  183. # define OSSL_CMP_PKISTATUS_rejection 2
  184. # define OSSL_CMP_PKISTATUS_waiting 3
  185. # define OSSL_CMP_PKISTATUS_revocationWarning 4
  186. # define OSSL_CMP_PKISTATUS_revocationNotification 5
  187. # define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
  188. typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
  189. DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
  190. # define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
  191. # define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
  192. /* data type declarations */
  193. typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
  194. typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
  195. DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIHEADER)
  196. typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
  197. DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
  198. typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
  199. DEFINE_STACK_OF(OSSL_CMP_CERTSTATUS)
  200. typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
  201. DEFINE_STACK_OF(OSSL_CMP_ITAV)
  202. typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
  203. typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
  204. DEFINE_STACK_OF(OSSL_CMP_PKISI)
  205. typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
  206. DEFINE_STACK_OF(OSSL_CMP_CERTREPMESSAGE)
  207. typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
  208. typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
  209. typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
  210. DEFINE_STACK_OF(OSSL_CMP_CERTRESPONSE)
  211. typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
  212. /*
  213. * function DECLARATIONS
  214. */
  215. /* from cmp_asn.c */
  216. OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
  217. void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
  218. ASN1_TYPE *value);
  219. ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
  220. ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
  221. int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **itav_sk_p,
  222. OSSL_CMP_ITAV *itav);
  223. void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
  224. void OSSL_CMP_MSG_free(OSSL_CMP_MSG *msg);
  225. /* from cmp_ctx.c */
  226. OSSL_CMP_CTX *OSSL_CMP_CTX_new(void);
  227. void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
  228. int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
  229. /* various CMP options: */
  230. # define OSSL_CMP_OPT_LOG_VERBOSITY 0
  231. # define OSSL_CMP_OPT_MSGTIMEOUT 1
  232. # define OSSL_CMP_OPT_TOTALTIMEOUT 2
  233. # define OSSL_CMP_OPT_VALIDITYDAYS 3
  234. # define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 4
  235. # define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 5
  236. # define OSSL_CMP_OPT_POLICIES_CRITICAL 6
  237. # define OSSL_CMP_OPT_POPOMETHOD 7
  238. # define OSSL_CMP_OPT_DIGEST_ALGNID 8
  239. # define OSSL_CMP_OPT_OWF_ALGNID 9
  240. # define OSSL_CMP_OPT_MAC_ALGNID 10
  241. # define OSSL_CMP_OPT_REVOCATION_REASON 11
  242. # define OSSL_CMP_OPT_IMPLICITCONFIRM 12
  243. # define OSSL_CMP_OPT_DISABLECONFIRM 13
  244. # define OSSL_CMP_OPT_UNPROTECTED_SEND 14
  245. # define OSSL_CMP_OPT_UNPROTECTED_ERRORS 15
  246. # define OSSL_CMP_OPT_IGNORE_KEYUSAGE 16
  247. # define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 17
  248. int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
  249. int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
  250. /* CMP-specific callback for logging and outputting the error queue: */
  251. int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_log_cb_t cb);
  252. # define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
  253. OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
  254. void OSSL_CMP_CTX_print_errors(OSSL_CMP_CTX *ctx);
  255. /* message transfer: */
  256. int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
  257. int OSSL_CMP_CTX_set1_serverName(OSSL_CMP_CTX *ctx, const char *name);
  258. int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
  259. int OSSL_CMP_CTX_set1_proxyName(OSSL_CMP_CTX *ctx, const char *name);
  260. int OSSL_CMP_CTX_set_proxyPort(OSSL_CMP_CTX *ctx, int port);
  261. # define OSSL_CMP_DEFAULT_PORT 80
  262. int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
  263. int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
  264. void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
  265. typedef OSSL_CMP_MSG *(*OSSL_cmp_transfer_cb_t) (OSSL_CMP_CTX *ctx,
  266. const OSSL_CMP_MSG *req);
  267. int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_transfer_cb_t cb);
  268. int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
  269. void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
  270. /* server authentication: */
  271. int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
  272. int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
  273. int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
  274. X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
  275. int OSSL_CMP_CTX_set1_untrusted_certs(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
  276. STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted_certs(const OSSL_CMP_CTX *ctx);
  277. /* client authentication: */
  278. int OSSL_CMP_CTX_set1_clCert(OSSL_CMP_CTX *ctx, X509 *cert);
  279. int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
  280. int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
  281. const unsigned char *ref, int len);
  282. int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, const unsigned char *sec,
  283. const int len);
  284. /* CMP message header and extra certificates: */
  285. int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
  286. int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
  287. int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
  288. STACK_OF(X509) *extraCertsOut);
  289. /* certificate template: */
  290. int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
  291. EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
  292. int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
  293. int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
  294. int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx, const GENERAL_NAME *name);
  295. int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
  296. int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
  297. int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
  298. int OSSL_CMP_CTX_set1_oldCert(OSSL_CMP_CTX *ctx, X509 *cert);
  299. int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
  300. /* misc body contents: */
  301. int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
  302. /* certificate confirmation: */
  303. typedef int (*OSSL_cmp_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
  304. int fail_info, const char **txt);
  305. int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_certConf_cb_t cb);
  306. int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
  307. void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
  308. /* result fetching: */
  309. int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
  310. OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
  311. int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
  312. # define OSSL_CMP_PKISI_BUFLEN 1024
  313. X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
  314. STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
  315. STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
  316. /* support application-level CMP debugging in cmp.c: */
  317. int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
  318. const ASN1_OCTET_STRING *id);
  319. int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
  320. const ASN1_OCTET_STRING *nonce);
  321. /* from cmp_status.c */
  322. char *OSSL_CMP_CTX_snprint_PKIStatus(OSSL_CMP_CTX *ctx, char *buf,
  323. size_t bufsize);
  324. /* from cmp_hdr.c */
  325. /* support application-level CMP debugging in cmp.c: */
  326. ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const OSSL_CMP_PKIHEADER *hdr);
  327. ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
  328. /* from cmp_msg.c */
  329. /* support application-level CMP debugging in cmp.c: */
  330. OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
  331. # ifdef __cplusplus
  332. }
  333. # endif
  334. # endif /* !defined OPENSSL_NO_CMP */
  335. #endif /* !defined OPENSSL_CMP_H */