2 * Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright Nokia 2007-2019
4 * Copyright Siemens AG 2015-2019
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
12 #ifndef OSSL_CRYPTO_CMP_LOCAL_H
13 # define OSSL_CRYPTO_CMP_LOCAL_H
15 # include "internal/cryptlib.h"
17 # include <openssl/cmp.h>
18 # include <openssl/err.h>
20 /* explicit #includes not strictly needed since implied by the above: */
21 # include <openssl/crmf.h>
22 # include <openssl/types.h>
23 # include <openssl/safestack.h>
24 # include <openssl/x509.h>
25 # include <openssl/x509v3.h>
28 * this structure is used to store the context for CMP sessions
30 struct ossl_cmp_ctx_st
{
33 OSSL_CMP_log_cb_t log_cb
; /* log callback for error/debug/etc. output */
34 OSSL_CMP_severity log_verbosity
; /* level of verbosity of log output */
36 /* message transfer */
37 OSSL_CMP_transfer_cb_t transfer_cb
; /* default: OSSL_CMP_MSG_http_perform */
38 void *transfer_cb_arg
; /* allows to store optional argument to cb */
39 /* HTTP-based transfer */
45 int msg_timeout
; /* max seconds to wait for each CMP message round trip */
46 int total_timeout
; /* max number of seconds an enrollment may take, incl. */
47 /* attempts polling for a response if a 'waiting' PKIStatus is received */
48 time_t end_time
; /* session start time + totaltimeout */
49 OSSL_HTTP_bio_cb_t http_cb
;
50 void *http_cb_arg
; /* allows to store optional argument to cb */
52 /* server authentication */
54 * unprotectedErrors may be set as workaround for broken server responses:
55 * accept missing or invalid protection of regular error messages, negative
56 * certificate responses (ip/cp/kup), revocation responses (rp), and PKIConf
58 int unprotectedErrors
;
59 X509
*srvCert
; /* certificate used to identify the server */
60 X509
*validatedSrvCert
; /* caches any already validated server cert */
61 X509_NAME
*expected_sender
; /* expected sender in header of response */
62 X509_STORE
*trusted
; /* trust store maybe w CRLs and cert verify callback */
63 STACK_OF(X509
) *untrusted_certs
; /* untrusted (intermediate) certs */
64 int ignore_keyusage
; /* ignore key usage entry when validating certs */
66 * permitTAInExtraCertsForIR allows use of root certs in extracerts
67 * when validating message protection; this is used for 3GPP-style E.7
69 int permitTAInExtraCertsForIR
;
71 /* client authentication */
72 int unprotectedSend
; /* send unprotected PKI messages */
73 X509
*cert
; /* protection cert used to identify and sign for MSG_SIG_ALG */
74 EVP_PKEY
*pkey
; /* the key pair corresponding to cert */
75 ASN1_OCTET_STRING
*referenceValue
; /* optional user name for MSG_MAC_ALG */
76 ASN1_OCTET_STRING
*secretValue
; /* password/shared secret for MSG_MAC_ALG */
77 /* PBMParameters for MSG_MAC_ALG */
78 size_t pbm_slen
; /* salt length, currently fixed to 16 */
79 EVP_MD
*pbm_owf
; /* one-way function (OWF), default: SHA256 */
80 int pbm_itercnt
; /* OWF iteration count, currently fixed to 500 */
81 int pbm_mac
; /* NID of MAC algorithm, default: HMAC-SHA1 as per RFC 4210 */
83 /* CMP message header and extra certificates */
84 X509_NAME
*recipient
; /* to set in recipient in pkiheader */
85 EVP_MD
*digest
; /* digest used in MSG_SIG_ALG and POPO, default SHA256 */
86 ASN1_OCTET_STRING
*transactionID
; /* the current transaction ID */
87 ASN1_OCTET_STRING
*senderNonce
; /* last nonce sent */
88 ASN1_OCTET_STRING
*recipNonce
; /* last nonce received */
89 ASN1_UTF8STRING
*freeText
; /* optional string to include each msg */
90 STACK_OF(OSSL_CMP_ITAV
) *geninfo_ITAVs
;
91 int implicitConfirm
; /* set implicitConfirm in IR/KUR/CR messages */
92 int disableConfirm
; /* disable certConf in IR/KUR/CR for broken servers */
93 STACK_OF(X509
) *extraCertsOut
; /* to be included in request messages */
95 /* certificate template */
96 EVP_PKEY
*newPkey
; /* explicit new private/public key for cert enrollment */
97 int newPkey_priv
; /* flag indicating if newPkey contains private key */
98 X509_NAME
*issuer
; /* issuer name to used in cert template */
99 int days
; /* Number of days new certificates are asked to be valid for */
100 X509_NAME
*subjectName
; /* subject name to be used in cert template */
101 STACK_OF(GENERAL_NAME
) *subjectAltNames
; /* to add to the cert template */
102 int SubjectAltName_nodefault
;
103 int setSubjectAltNameCritical
;
104 X509_EXTENSIONS
*reqExtensions
; /* exts to be added to cert template */
105 CERTIFICATEPOLICIES
*policies
; /* policies to be included in extensions */
106 int setPoliciesCritical
;
107 int popoMethod
; /* Proof-of-possession mechanism; default: signature */
108 X509
*oldCert
; /* cert to be updated (via KUR) or to be revoked (via RR) */
109 X509_REQ
*p10CSR
; /* for P10CR: PKCS#10 CSR to be sent */
111 /* misc body contents */
112 int revocationReason
; /* revocation reason code to be included in RR */
113 STACK_OF(OSSL_CMP_ITAV
) *genm_ITAVs
; /* content of general message */
115 /* result returned in responses */
116 int status
; /* PKIStatus of last received IP/CP/KUP/RP/error or -1 */
117 /* TODO: this should be a stack since there could be more than one */
118 OSSL_CMP_PKIFREETEXT
*statusString
; /* of last IP/CP/KUP/RP/error */
119 int failInfoCode
; /* failInfoCode of last received IP/CP/KUP/error, or -1 */
120 /* TODO: this should be a stack since there could be more than one */
121 X509
*newCert
; /* newly enrolled cert received from the CA */
122 /* TODO: this should be a stack since there could be more than one */
123 STACK_OF(X509
) *newChain
; /* chain of newly enrolled cert received */
124 STACK_OF(X509
) *caPubs
; /* CA certs received from server (in IP message) */
125 STACK_OF(X509
) *extraCertsIn
; /* extraCerts received from server */
127 /* certificate confirmation */
128 OSSL_CMP_certConf_cb_t certConf_cb
; /* callback for app checking new cert */
129 void *certConf_cb_arg
; /* allows to store an argument individual to cb */
130 } /* OSSL_CMP_CTX */;
133 * ##########################################################################
135 * ##########################################################################
139 * RevAnnContent ::= SEQUENCE {
142 * willBeRevokedAt GeneralizedTime,
143 * badSinceDate GeneralizedTime,
144 * crlDetails Extensions OPTIONAL
145 * -- extra CRL details (e.g., crl number, reason, location, etc.)
148 typedef struct ossl_cmp_revanncontent_st
{
149 ASN1_INTEGER
*status
;
150 OSSL_CRMF_CERTID
*certId
;
151 ASN1_GENERALIZEDTIME
*willBeRevokedAt
;
152 ASN1_GENERALIZEDTIME
*badSinceDate
;
153 X509_EXTENSIONS
*crlDetails
;
154 } OSSL_CMP_REVANNCONTENT
;
155 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_REVANNCONTENT
)
158 * Challenge ::= SEQUENCE {
159 * owf AlgorithmIdentifier OPTIONAL,
161 * -- MUST be present in the first Challenge; MAY be omitted in
162 * -- any subsequent Challenge in POPODecKeyChallContent (if
163 * -- omitted, then the owf used in the immediately preceding
164 * -- Challenge is to be used).
166 * witness OCTET STRING,
167 * -- the result of applying the one-way function (owf) to a
168 * -- randomly-generated INTEGER, A. [Note that a different
169 * -- INTEGER MUST be used for each Challenge.]
170 * challenge OCTET STRING
171 * -- the encryption (under the public key for which the cert.
172 * -- request is being made) of Rand, where Rand is specified as
173 * -- Rand ::= SEQUENCE {
175 * -- - the randomly-generated INTEGER A (above)
176 * -- sender GeneralName
177 * -- - the sender's name (as included in PKIHeader)
181 typedef struct ossl_cmp_challenge_st
{
183 ASN1_OCTET_STRING
*witness
;
184 ASN1_OCTET_STRING
*challenge
;
185 } OSSL_CMP_CHALLENGE
;
186 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CHALLENGE
)
189 * CAKeyUpdAnnContent ::= SEQUENCE {
190 * oldWithNew Certificate,
191 * newWithOld Certificate,
192 * newWithNew Certificate
195 typedef struct ossl_cmp_cakeyupdanncontent_st
{
199 } OSSL_CMP_CAKEYUPDANNCONTENT
;
200 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CAKEYUPDANNCONTENT
)
203 * declared already here as it will be used in OSSL_CMP_MSG (nested) and
204 * infoType and infoValue
206 typedef STACK_OF(OSSL_CMP_MSG
) OSSL_CMP_MSGS
;
207 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_MSGS
)
210 * InfoTypeAndValue ::= SEQUENCE {
211 * infoType OBJECT IDENTIFIER,
212 * infoValue ANY DEFINED BY infoType OPTIONAL
215 struct ossl_cmp_itav_st
{
216 ASN1_OBJECT
*infoType
;
219 /* NID_id_it_caProtEncCert - CA Protocol Encryption Certificate */
221 /* NID_id_it_signKeyPairTypes - Signing Key Pair Types */
222 STACK_OF(X509_ALGOR
) *signKeyPairTypes
;
223 /* NID_id_it_encKeyPairTypes - Encryption/Key Agreement Key Pair Types */
224 STACK_OF(X509_ALGOR
) *encKeyPairTypes
;
225 /* NID_id_it_preferredSymmAlg - Preferred Symmetric Algorithm */
226 X509_ALGOR
*preferredSymmAlg
;
227 /* NID_id_it_caKeyUpdateInfo - Updated CA Key Pair */
228 OSSL_CMP_CAKEYUPDANNCONTENT
*caKeyUpdateInfo
;
229 /* NID_id_it_currentCRL - CRL */
230 X509_CRL
*currentCRL
;
231 /* NID_id_it_unsupportedOIDs - Unsupported Object Identifiers */
232 STACK_OF(ASN1_OBJECT
) *unsupportedOIDs
;
233 /* NID_id_it_keyPairParamReq - Key Pair Parameters Request */
234 ASN1_OBJECT
*keyPairParamReq
;
235 /* NID_id_it_keyPairParamRep - Key Pair Parameters Response */
236 X509_ALGOR
*keyPairParamRep
;
237 /* NID_id_it_revPassphrase - Revocation Passphrase */
238 OSSL_CRMF_ENCRYPTEDVALUE
*revPassphrase
;
239 /* NID_id_it_implicitConfirm - ImplicitConfirm */
240 ASN1_NULL
*implicitConfirm
;
241 /* NID_id_it_confirmWaitTime - ConfirmWaitTime */
242 ASN1_GENERALIZEDTIME
*confirmWaitTime
;
243 /* NID_id_it_origPKIMessage - origPKIMessage */
244 OSSL_CMP_MSGS
*origPKIMessage
;
245 /* NID_id_it_suppLangTags - Supported Language Tags */
246 STACK_OF(ASN1_UTF8STRING
) *suppLangTagsValue
;
247 /* this is to be used for so far undeclared objects */
250 } /* OSSL_CMP_ITAV */;
251 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ITAV
)
253 typedef struct ossl_cmp_certorenccert_st
{
257 OSSL_CRMF_ENCRYPTEDVALUE
*encryptedCert
;
259 } OSSL_CMP_CERTORENCCERT
;
260 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CERTORENCCERT
)
263 * CertifiedKeyPair ::= SEQUENCE {
264 * certOrEncCert CertOrEncCert,
265 * privateKey [0] EncryptedValue OPTIONAL,
266 * -- see [CRMF] for comment on encoding
267 * publicationInfo [1] PKIPublicationInfo OPTIONAL
270 typedef struct ossl_cmp_certifiedkeypair_st
{
271 OSSL_CMP_CERTORENCCERT
*certOrEncCert
;
272 OSSL_CRMF_ENCRYPTEDVALUE
*privateKey
;
273 OSSL_CRMF_PKIPUBLICATIONINFO
*publicationInfo
;
274 } OSSL_CMP_CERTIFIEDKEYPAIR
;
275 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CERTIFIEDKEYPAIR
)
278 * PKIStatusInfo ::= SEQUENCE {
280 * statusString PKIFreeText OPTIONAL,
281 * failInfo PKIFailureInfo OPTIONAL
284 struct ossl_cmp_pkisi_st
{
285 OSSL_CMP_PKISTATUS
*status
;
286 OSSL_CMP_PKIFREETEXT
*statusString
;
287 OSSL_CMP_PKIFAILUREINFO
*failInfo
;
288 } /* OSSL_CMP_PKISI */;
291 * RevReqContent ::= SEQUENCE OF RevDetails
293 * RevDetails ::= SEQUENCE {
294 * certDetails CertTemplate,
295 * crlEntryDetails Extensions OPTIONAL
298 struct ossl_cmp_revdetails_st
{
299 OSSL_CRMF_CERTTEMPLATE
*certDetails
;
300 X509_EXTENSIONS
*crlEntryDetails
;
301 } /* OSSL_CMP_REVDETAILS */;
302 typedef struct ossl_cmp_revdetails_st OSSL_CMP_REVDETAILS
;
303 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_REVDETAILS
)
304 DEFINE_STACK_OF(OSSL_CMP_REVDETAILS
)
307 * RevRepContent ::= SEQUENCE {
308 * status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
309 * -- in same order as was sent in RevReqContent
310 * revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId
312 * -- IDs for which revocation was requested
313 * -- (same order as status)
314 * crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList
316 * -- the resulting CRLs (there may be more than one)
319 struct ossl_cmp_revrepcontent_st
{
320 STACK_OF(OSSL_CMP_PKISI
) *status
;
321 STACK_OF(OSSL_CRMF_CERTID
) *revCerts
;
322 STACK_OF(X509_CRL
) *crls
;
323 } /* OSSL_CMP_REVREPCONTENT */;
324 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_REVREPCONTENT
)
327 * KeyRecRepContent ::= SEQUENCE {
328 * status PKIStatusInfo,
329 * newSigCert [0] Certificate OPTIONAL,
330 * caCerts [1] SEQUENCE SIZE (1..MAX) OF
331 * Certificate OPTIONAL,
332 * keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
333 * CertifiedKeyPair OPTIONAL
336 typedef struct ossl_cmp_keyrecrepcontent_st
{
337 OSSL_CMP_PKISI
*status
;
339 STACK_OF(X509
) *caCerts
;
340 STACK_OF(OSSL_CMP_CERTIFIEDKEYPAIR
) *keyPairHist
;
341 } OSSL_CMP_KEYRECREPCONTENT
;
342 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_KEYRECREPCONTENT
)
345 * ErrorMsgContent ::= SEQUENCE {
346 * pKIStatusInfo PKIStatusInfo,
347 * errorCode INTEGER OPTIONAL,
348 * -- implementation-specific error codes
349 * errorDetails PKIFreeText OPTIONAL
350 * -- implementation-specific error details
353 typedef struct ossl_cmp_errormsgcontent_st
{
354 OSSL_CMP_PKISI
*pKIStatusInfo
;
355 ASN1_INTEGER
*errorCode
;
356 OSSL_CMP_PKIFREETEXT
*errorDetails
;
357 } OSSL_CMP_ERRORMSGCONTENT
;
358 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ERRORMSGCONTENT
)
361 * CertConfirmContent ::= SEQUENCE OF CertStatus
363 * CertStatus ::= SEQUENCE {
364 * certHash OCTET STRING,
365 * -- the hash of the certificate, using the same hash algorithm
366 * -- as is used to create and verify the certificate signature
368 * -- to match this confirmation with the corresponding req/rep
369 * statusInfo PKIStatusInfo OPTIONAL
372 struct ossl_cmp_certstatus_st
{
373 ASN1_OCTET_STRING
*certHash
;
374 ASN1_INTEGER
*certReqId
;
375 OSSL_CMP_PKISI
*statusInfo
;
376 } /* OSSL_CMP_CERTSTATUS */;
377 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CERTSTATUS
)
378 typedef STACK_OF(OSSL_CMP_CERTSTATUS
) OSSL_CMP_CERTCONFIRMCONTENT
;
379 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CERTCONFIRMCONTENT
)
382 * CertResponse ::= SEQUENCE {
384 * -- to match this response with corresponding request (a value
385 * -- of -1 is to be used if certReqId is not specified in the
386 * -- corresponding request)
387 * status PKIStatusInfo,
388 * certifiedKeyPair CertifiedKeyPair OPTIONAL,
389 * rspInfo OCTET STRING OPTIONAL
390 * -- analogous to the id-regInfo-utf8Pairs string defined
391 * -- for regInfo in CertReqMsg [CRMF]
394 struct ossl_cmp_certresponse_st
{
395 ASN1_INTEGER
*certReqId
;
396 OSSL_CMP_PKISI
*status
;
397 OSSL_CMP_CERTIFIEDKEYPAIR
*certifiedKeyPair
;
398 ASN1_OCTET_STRING
*rspInfo
;
399 } /* OSSL_CMP_CERTRESPONSE */;
400 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CERTRESPONSE
)
403 * CertRepMessage ::= SEQUENCE {
404 * caPubs [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
406 * response SEQUENCE OF CertResponse
409 struct ossl_cmp_certrepmessage_st
{
410 STACK_OF(X509
) *caPubs
;
411 STACK_OF(OSSL_CMP_CERTRESPONSE
) *response
;
412 } /* OSSL_CMP_CERTREPMESSAGE */;
413 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CERTREPMESSAGE
)
416 * PollReqContent ::= SEQUENCE OF SEQUENCE {
420 typedef struct ossl_cmp_pollreq_st
{
421 ASN1_INTEGER
*certReqId
;
423 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_POLLREQ
)
424 DEFINE_STACK_OF(OSSL_CMP_POLLREQ
)
425 typedef STACK_OF(OSSL_CMP_POLLREQ
) OSSL_CMP_POLLREQCONTENT
;
426 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_POLLREQCONTENT
)
429 * PollRepContent ::= SEQUENCE OF SEQUENCE {
431 * checkAfter INTEGER, -- time in seconds
432 * reason PKIFreeText OPTIONAL
435 struct ossl_cmp_pollrep_st
{
436 ASN1_INTEGER
*certReqId
;
437 ASN1_INTEGER
*checkAfter
;
438 OSSL_CMP_PKIFREETEXT
*reason
;
439 } /* OSSL_CMP_POLLREP */;
440 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_POLLREP
)
441 DEFINE_STACK_OF(OSSL_CMP_POLLREP
)
442 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_POLLREPCONTENT
)
445 * PKIHeader ::= SEQUENCE {
446 * pvno INTEGER { cmp1999(1), cmp2000(2) },
447 * sender GeneralName,
448 * -- identifies the sender
449 * recipient GeneralName,
450 * -- identifies the intended recipient
451 * messageTime [0] GeneralizedTime OPTIONAL,
452 * -- time of production of this message (used when sender
453 * -- believes that the transport will be "suitable"; i.e.,
454 * -- that the time will still be meaningful upon receipt)
455 * protectionAlg [1] AlgorithmIdentifier OPTIONAL,
456 * -- algorithm used for calculation of protection bits
457 * senderKID [2] KeyIdentifier OPTIONAL,
458 * recipKID [3] KeyIdentifier OPTIONAL,
459 * -- to identify specific keys used for protection
460 * transactionID [4] OCTET STRING OPTIONAL,
461 * -- identifies the transaction; i.e., this will be the same in
462 * -- corresponding request, response, certConf, and PKIConf
464 * senderNonce [5] OCTET STRING OPTIONAL,
465 * recipNonce [6] OCTET STRING OPTIONAL,
466 * -- nonces used to provide replay protection, senderNonce
467 * -- is inserted by the creator of this message; recipNonce
468 * -- is a nonce previously inserted in a related message by
469 * -- the intended recipient of this message
470 * freeText [7] PKIFreeText OPTIONAL,
471 * -- this may be used to indicate context-specific instructions
472 * -- (this field is intended for human consumption)
473 * generalInfo [8] SEQUENCE SIZE (1..MAX) OF
474 * InfoTypeAndValue OPTIONAL
475 * -- this may be used to convey context-specific information
476 * -- (this field not primarily intended for human consumption)
479 struct ossl_cmp_pkiheader_st
{
481 GENERAL_NAME
*sender
;
482 GENERAL_NAME
*recipient
;
483 ASN1_GENERALIZEDTIME
*messageTime
; /* 0 */
484 X509_ALGOR
*protectionAlg
; /* 1 */
485 ASN1_OCTET_STRING
*senderKID
; /* 2 */
486 ASN1_OCTET_STRING
*recipKID
; /* 3 */
487 ASN1_OCTET_STRING
*transactionID
; /* 4 */
488 ASN1_OCTET_STRING
*senderNonce
; /* 5 */
489 ASN1_OCTET_STRING
*recipNonce
; /* 6 */
490 OSSL_CMP_PKIFREETEXT
*freeText
; /* 7 */
491 STACK_OF(OSSL_CMP_ITAV
) *generalInfo
; /* 8 */
492 } /* OSSL_CMP_PKIHEADER */;
494 typedef STACK_OF(OSSL_CMP_CHALLENGE
) OSSL_CMP_POPODECKEYCHALLCONTENT
;
495 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_POPODECKEYCHALLCONTENT
)
496 typedef STACK_OF(ASN1_INTEGER
) OSSL_CMP_POPODECKEYRESPCONTENT
;
497 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_POPODECKEYRESPCONTENT
)
498 typedef STACK_OF(OSSL_CMP_REVDETAILS
) OSSL_CMP_REVREQCONTENT
;
499 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_REVREQCONTENT
)
500 typedef STACK_OF(X509_CRL
) OSSL_CMP_CRLANNCONTENT
;
501 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_CRLANNCONTENT
)
502 typedef STACK_OF(OSSL_CMP_ITAV
) OSSL_CMP_GENMSGCONTENT
;
503 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_GENMSGCONTENT
)
504 typedef STACK_OF(OSSL_CMP_ITAV
) OSSL_CMP_GENREPCONTENT
;
505 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_GENREPCONTENT
)
508 * PKIBody ::= CHOICE { -- message-specific body elements
509 * ir [0] CertReqMessages, --Initialization Request
510 * ip [1] CertRepMessage, --Initialization Response
511 * cr [2] CertReqMessages, --Certification Request
512 * cp [3] CertRepMessage, --Certification Response
513 * p10cr [4] CertificationRequest, --imported from [PKCS10]
514 * popdecc [5] POPODecKeyChallContent, --pop Challenge
515 * popdecr [6] POPODecKeyRespContent, --pop Response
516 * kur [7] CertReqMessages, --Key Update Request
517 * kup [8] CertRepMessage, --Key Update Response
518 * krr [9] CertReqMessages, --Key Recovery Request
519 * krp [10] KeyRecRepContent, --Key Recovery Response
520 * rr [11] RevReqContent, --Revocation Request
521 * rp [12] RevRepContent, --Revocation Response
522 * ccr [13] CertReqMessages, --Cross-Cert. Request
523 * ccp [14] CertRepMessage, --Cross-Cert. Response
524 * ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
525 * cann [16] CertAnnContent, --Certificate Ann.
526 * rann [17] RevAnnContent, --Revocation Ann.
527 * crlann [18] CRLAnnContent, --CRL Announcement
528 * pkiconf [19] PKIConfirmContent, --Confirmation
529 * nested [20] NestedMessageContent, --Nested Message
530 * genm [21] GenMsgContent, --General Message
531 * genp [22] GenRepContent, --General Response
532 * error [23] ErrorMsgContent, --Error Message
533 * certConf [24] CertConfirmContent, --Certificate confirm
534 * pollReq [25] PollReqContent, --Polling request
535 * pollRep [26] PollRepContent --Polling response
538 typedef struct ossl_cmp_pkibody_st
{
541 OSSL_CRMF_MSGS
*ir
; /* 0 */
542 OSSL_CMP_CERTREPMESSAGE
*ip
; /* 1 */
543 OSSL_CRMF_MSGS
*cr
; /* 2 */
544 OSSL_CMP_CERTREPMESSAGE
*cp
; /* 3 */
546 * p10cr [4] CertificationRequest, --imported from [PKCS10]
548 * PKCS10_CERTIFICATIONREQUEST is effectively X509_REQ
549 * so it is used directly
551 X509_REQ
*p10cr
; /* 4 */
553 * popdecc [5] POPODecKeyChallContent, --pop Challenge
555 * POPODecKeyChallContent ::= SEQUENCE OF Challenge
557 OSSL_CMP_POPODECKEYCHALLCONTENT
*popdecc
; /* 5 */
559 * popdecr [6] POPODecKeyRespContent, --pop Response
561 * POPODecKeyRespContent ::= SEQUENCE OF INTEGER
563 OSSL_CMP_POPODECKEYRESPCONTENT
*popdecr
; /* 6 */
564 OSSL_CRMF_MSGS
*kur
; /* 7 */
565 OSSL_CMP_CERTREPMESSAGE
*kup
; /* 8 */
566 OSSL_CRMF_MSGS
*krr
; /* 9 */
569 * krp [10] KeyRecRepContent, --Key Recovery Response
571 OSSL_CMP_KEYRECREPCONTENT
*krp
; /* 10 */
573 * rr [11] RevReqContent, --Revocation Request
575 OSSL_CMP_REVREQCONTENT
*rr
; /* 11 */
577 * rp [12] RevRepContent, --Revocation Response
579 OSSL_CMP_REVREPCONTENT
*rp
; /* 12 */
581 * ccr [13] CertReqMessages, --Cross-Cert. Request
583 OSSL_CRMF_MSGS
*ccr
; /* 13 */
585 * ccp [14] CertRepMessage, --Cross-Cert. Response
587 OSSL_CMP_CERTREPMESSAGE
*ccp
; /* 14 */
589 * ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
591 OSSL_CMP_CAKEYUPDANNCONTENT
*ckuann
; /* 15 */
593 * cann [16] CertAnnContent, --Certificate Ann.
594 * OSSL_CMP_CMPCERTIFICATE is effectively X509 so it is used directly
598 * rann [17] RevAnnContent, --Revocation Ann.
600 OSSL_CMP_REVANNCONTENT
*rann
; /* 17 */
602 * crlann [18] CRLAnnContent, --CRL Announcement
603 * CRLAnnContent ::= SEQUENCE OF CertificateList
605 OSSL_CMP_CRLANNCONTENT
*crlann
; /* 18 */
607 * PKIConfirmContent ::= NULL
608 * pkiconf [19] PKIConfirmContent, --Confirmation
609 * OSSL_CMP_PKICONFIRMCONTENT would be only a typedef of ASN1_NULL
610 * OSSL_CMP_CONFIRMCONTENT *pkiconf;
612 * NOTE: this should ASN1_NULL according to the RFC
613 * but there might be a struct in it when sent from faulty servers...
615 ASN1_TYPE
*pkiconf
; /* 19 */
617 * nested [20] NestedMessageContent, --Nested Message
618 * NestedMessageContent ::= PKIMessages
620 OSSL_CMP_MSGS
*nested
; /* 20 */
622 * genm [21] GenMsgContent, --General Message
623 * GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
625 OSSL_CMP_GENMSGCONTENT
*genm
; /* 21 */
627 * genp [22] GenRepContent, --General Response
628 * GenRepContent ::= SEQUENCE OF InfoTypeAndValue
630 OSSL_CMP_GENREPCONTENT
*genp
; /* 22 */
632 * error [23] ErrorMsgContent, --Error Message
634 OSSL_CMP_ERRORMSGCONTENT
*error
; /* 23 */
636 * certConf [24] CertConfirmContent, --Certificate confirm
638 OSSL_CMP_CERTCONFIRMCONTENT
*certConf
; /* 24 */
640 * pollReq [25] PollReqContent, --Polling request
642 OSSL_CMP_POLLREQCONTENT
*pollReq
; /* 25 */
644 * pollRep [26] PollRepContent --Polling response
646 OSSL_CMP_POLLREPCONTENT
*pollRep
; /* 26 */
649 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIBODY
)
652 * PKIProtection ::= BIT STRING
654 * PKIMessages ::= SEQUENCE SIZE (1..MAX) OF PKIMessage
656 * PKIMessage ::= SEQUENCE {
659 * protection [0] PKIProtection OPTIONAL,
660 * extraCerts [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
664 struct ossl_cmp_msg_st
{
665 OSSL_CMP_PKIHEADER
*header
;
666 OSSL_CMP_PKIBODY
*body
;
667 ASN1_BIT_STRING
*protection
; /* 0 */
668 /* OSSL_CMP_CMPCERTIFICATE is effectively X509 so it is used directly */
669 STACK_OF(X509
) *extraCerts
; /* 1 */
670 } /* OSSL_CMP_MSG */;
671 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_MSG
)
674 * ProtectedPart ::= SEQUENCE {
679 typedef struct ossl_cmp_protectedpart_st
{
680 OSSL_CMP_PKIHEADER
*header
;
681 OSSL_CMP_PKIBODY
*body
;
682 } OSSL_CMP_PROTECTEDPART
;
683 DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PROTECTEDPART
)
686 * this is not defined here as it is already in CRMF:
687 * id-PasswordBasedMac OBJECT IDENTIFIER ::= {1 2 840 113533 7 66 13}
688 * PBMParameter ::= SEQUENCE {
690 * -- note: implementations MAY wish to limit acceptable sizes
691 * -- of this string to values appropriate for their environment
692 * -- in order to reduce the risk of denial-of-service attacks
693 * owf AlgorithmIdentifier,
694 * -- AlgId for a One-Way Function (SHA-1 recommended)
695 * iterationCount INTEGER,
696 * -- number of times the OWF is applied
697 * -- note: implementations MAY wish to limit acceptable sizes
698 * -- of this integer to values appropriate for their environment
699 * -- in order to reduce the risk of denial-of-service attacks
700 * mac AlgorithmIdentifier
701 * -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
702 * } -- or HMAC [RFC2104, RFC2202])
705 * TODO: this is not yet defined here - but DH is anyway not used yet
707 * id-DHBasedMac OBJECT IDENTIFIER ::= {1 2 840 113533 7 66 30}
708 * DHBMParameter ::= SEQUENCE {
709 * owf AlgorithmIdentifier,
710 * -- AlgId for a One-Way Function (SHA-1 recommended)
711 * mac AlgorithmIdentifier
712 * -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
713 * } -- or HMAC [RFC2104, RFC2202])
716 * The following is not cared for, because it is described in section 5.2.5
717 * that this is beyond the scope of CMP
718 * OOBCert ::= CMPCertificate
720 * OOBCertHash ::= SEQUENCE {
721 * hashAlg [0] AlgorithmIdentifier OPTIONAL,
722 * certId [1] CertId OPTIONAL,
724 * -- hashVal is calculated over the DER encoding of the
725 * -- self-signed certificate with the identifier certID.
730 int ossl_cmp_asn1_get_int(const ASN1_INTEGER
*a
);
732 /* from cmp_util.c */
733 const char *ossl_cmp_log_parse_metadata(const char *buf
,
734 OSSL_CMP_severity
*level
, char **func
,
735 char **file
, int *line
);
736 # define ossl_cmp_add_error_data(txt) ERR_add_error_txt(" : ", txt)
737 # define ossl_cmp_add_error_line(txt) ERR_add_error_txt("\n", txt)
738 /* The two functions manipulating X509_STORE could be generally useful */
739 int ossl_cmp_X509_STORE_add1_certs(X509_STORE
*store
, STACK_OF(X509
) *certs
,
740 int only_self_issued
);
741 STACK_OF(X509
) *ossl_cmp_X509_STORE_get1_certs(X509_STORE
*store
);
742 int ossl_cmp_sk_ASN1_UTF8STRING_push_str(STACK_OF(ASN1_UTF8STRING
) *sk
,
744 int ossl_cmp_asn1_octet_string_set1(ASN1_OCTET_STRING
**tgt
,
745 const ASN1_OCTET_STRING
*src
);
746 int ossl_cmp_asn1_octet_string_set1_bytes(ASN1_OCTET_STRING
**tgt
,
747 const unsigned char *bytes
, int len
);
749 *ossl_cmp_build_cert_chain(OPENSSL_CTX
*libctx
, const char *propq
,
751 STACK_OF(X509
) *certs
, X509
*cert
);
754 int ossl_cmp_print_log(OSSL_CMP_severity level
, const OSSL_CMP_CTX
*ctx
,
755 const char *func
, const char *file
, int line
,
756 const char *level_str
, const char *format
, ...);
757 # define ossl_cmp_log(level, ctx, msg) \
758 ossl_cmp_print_log(OSSL_CMP_LOG_##level, ctx, OPENSSL_FUNC, OPENSSL_FILE, \
759 OPENSSL_LINE, #level, "%s", msg)
760 # define ossl_cmp_log1(level, ctx, fmt, arg1) \
761 ossl_cmp_print_log(OSSL_CMP_LOG_##level, ctx, OPENSSL_FUNC, OPENSSL_FILE, \
762 OPENSSL_LINE, #level, fmt, arg1)
763 # define ossl_cmp_log2(level, ctx, fmt, arg1, arg2) \
764 ossl_cmp_print_log(OSSL_CMP_LOG_##level, ctx, OPENSSL_FUNC, OPENSSL_FILE, \
765 OPENSSL_LINE, #level, fmt, arg1, arg2)
766 # define ossl_cmp_log3(level, ctx, fmt, arg1, arg2, arg3) \
767 ossl_cmp_print_log(OSSL_CMP_LOG_##level, ctx, OPENSSL_FUNC, OPENSSL_FILE, \
768 OPENSSL_LINE, #level, fmt, arg1, arg2, arg3)
769 # define ossl_cmp_log4(level, ctx, fmt, arg1, arg2, arg3, arg4) \
770 ossl_cmp_print_log(OSSL_CMP_LOG_##level, ctx, OPENSSL_FUNC, OPENSSL_FILE, \
771 OPENSSL_LINE, #level, fmt, arg1, arg2, arg3, arg4)
772 # define OSSL_CMP_LOG_ERROR OSSL_CMP_LOG_ERR
773 # define OSSL_CMP_LOG_WARN OSSL_CMP_LOG_WARNING
774 # define ossl_cmp_alert(ctx, msg) ossl_cmp_log(ALERT, ctx, msg)
775 # define ossl_cmp_err(ctx, msg) ossl_cmp_log(ERROR, ctx, msg)
776 # define ossl_cmp_warn(ctx, msg) ossl_cmp_log(WARN, ctx, msg)
777 # define ossl_cmp_info(ctx, msg) ossl_cmp_log(INFO, ctx, msg)
778 # define ossl_cmp_debug(ctx, msg) ossl_cmp_log(DEBUG, ctx, msg)
779 int ossl_cmp_ctx_set0_validatedSrvCert(OSSL_CMP_CTX
*ctx
, X509
*cert
);
780 int ossl_cmp_ctx_set_status(OSSL_CMP_CTX
*ctx
, int status
);
781 int ossl_cmp_ctx_set0_statusString(OSSL_CMP_CTX
*ctx
,
782 OSSL_CMP_PKIFREETEXT
*text
);
783 int ossl_cmp_ctx_set_failInfoCode(OSSL_CMP_CTX
*ctx
, int fail_info
);
784 int ossl_cmp_ctx_set0_newCert(OSSL_CMP_CTX
*ctx
, X509
*cert
);
785 int ossl_cmp_ctx_set1_newChain(OSSL_CMP_CTX
*ctx
, STACK_OF(X509
) *newChain
);
786 int ossl_cmp_ctx_set1_caPubs(OSSL_CMP_CTX
*ctx
, STACK_OF(X509
) *caPubs
);
787 int ossl_cmp_ctx_set1_extraCertsIn(OSSL_CMP_CTX
*ctx
,
788 STACK_OF(X509
) *extraCertsIn
);
789 int ossl_cmp_ctx_set1_recipNonce(OSSL_CMP_CTX
*ctx
,
790 const ASN1_OCTET_STRING
*nonce
);
792 /* from cmp_status.c */
793 int ossl_cmp_pkisi_get_status(const OSSL_CMP_PKISI
*si
);
794 const char *ossl_cmp_PKIStatus_to_string(int status
);
795 OSSL_CMP_PKIFREETEXT
*ossl_cmp_pkisi_get0_statusString(const OSSL_CMP_PKISI
*s
);
796 int ossl_cmp_pkisi_get_pkifailureinfo(const OSSL_CMP_PKISI
*si
);
797 int ossl_cmp_pkisi_check_pkifailureinfo(const OSSL_CMP_PKISI
*si
, int index
);
800 int ossl_cmp_hdr_set_pvno(OSSL_CMP_PKIHEADER
*hdr
, int pvno
);
801 int ossl_cmp_hdr_get_pvno(const OSSL_CMP_PKIHEADER
*hdr
);
802 int ossl_cmp_hdr_get_protection_nid(const OSSL_CMP_PKIHEADER
*hdr
);
803 ASN1_OCTET_STRING
*ossl_cmp_hdr_get0_senderNonce(const OSSL_CMP_PKIHEADER
*hdr
);
804 int ossl_cmp_general_name_is_NULL_DN(GENERAL_NAME
*name
);
805 int ossl_cmp_hdr_set1_sender(OSSL_CMP_PKIHEADER
*hdr
, const X509_NAME
*nm
);
806 int ossl_cmp_hdr_set1_recipient(OSSL_CMP_PKIHEADER
*hdr
, const X509_NAME
*nm
);
807 int ossl_cmp_hdr_update_messageTime(OSSL_CMP_PKIHEADER
*hdr
);
808 int ossl_cmp_hdr_set1_senderKID(OSSL_CMP_PKIHEADER
*hdr
,
809 const ASN1_OCTET_STRING
*senderKID
);
810 int ossl_cmp_hdr_push0_freeText(OSSL_CMP_PKIHEADER
*hdr
, ASN1_UTF8STRING
*text
);
811 int ossl_cmp_hdr_push1_freeText(OSSL_CMP_PKIHEADER
*hdr
, ASN1_UTF8STRING
*text
);
812 int ossl_cmp_hdr_generalInfo_push0_item(OSSL_CMP_PKIHEADER
*hdr
,
813 OSSL_CMP_ITAV
*itav
);
814 int ossl_cmp_hdr_generalInfo_push1_items(OSSL_CMP_PKIHEADER
*hdr
,
815 const STACK_OF(OSSL_CMP_ITAV
) *itavs
);
816 int ossl_cmp_hdr_set_implicitConfirm(OSSL_CMP_PKIHEADER
*hdr
);
817 int ossl_cmp_hdr_has_implicitConfirm(const OSSL_CMP_PKIHEADER
*hdr
);
818 # define OSSL_CMP_TRANSACTIONID_LENGTH 16
819 # define OSSL_CMP_SENDERNONCE_LENGTH 16
820 int ossl_cmp_hdr_set_transactionID(OSSL_CMP_CTX
*ctx
, OSSL_CMP_PKIHEADER
*hdr
);
821 int ossl_cmp_hdr_init(OSSL_CMP_CTX
*ctx
, OSSL_CMP_PKIHEADER
*hdr
);
824 /* OSSL_CMP_MSG bodytype ASN.1 choice IDs */
825 # define OSSL_CMP_PKIBODY_IR 0
826 # define OSSL_CMP_PKIBODY_IP 1
827 # define OSSL_CMP_PKIBODY_CR 2
828 # define OSSL_CMP_PKIBODY_CP 3
829 # define OSSL_CMP_PKIBODY_P10CR 4
830 # define OSSL_CMP_PKIBODY_POPDECC 5
831 # define OSSL_CMP_PKIBODY_POPDECR 6
832 # define OSSL_CMP_PKIBODY_KUR 7
833 # define OSSL_CMP_PKIBODY_KUP 8
834 # define OSSL_CMP_PKIBODY_KRR 9
835 # define OSSL_CMP_PKIBODY_KRP 10
836 # define OSSL_CMP_PKIBODY_RR 11
837 # define OSSL_CMP_PKIBODY_RP 12
838 # define OSSL_CMP_PKIBODY_CCR 13
839 # define OSSL_CMP_PKIBODY_CCP 14
840 # define OSSL_CMP_PKIBODY_CKUANN 15
841 # define OSSL_CMP_PKIBODY_CANN 16
842 # define OSSL_CMP_PKIBODY_RANN 17
843 # define OSSL_CMP_PKIBODY_CRLANN 18
844 # define OSSL_CMP_PKIBODY_PKICONF 19
845 # define OSSL_CMP_PKIBODY_NESTED 20
846 # define OSSL_CMP_PKIBODY_GENM 21
847 # define OSSL_CMP_PKIBODY_GENP 22
848 # define OSSL_CMP_PKIBODY_ERROR 23
849 # define OSSL_CMP_PKIBODY_CERTCONF 24
850 # define OSSL_CMP_PKIBODY_POLLREQ 25
851 # define OSSL_CMP_PKIBODY_POLLREP 26
852 # define OSSL_CMP_PKIBODY_TYPE_MAX OSSL_CMP_PKIBODY_POLLREP
853 /* certReqId for the first - and so far only - certificate request */
854 # define OSSL_CMP_CERTREQID 0
855 /* sequence id for the first - and so far only - revocation request */
856 # define OSSL_CMP_REVREQSID 0
857 const char *ossl_cmp_bodytype_to_string(int type
);
858 int ossl_cmp_msg_set_bodytype(OSSL_CMP_MSG
*msg
, int type
);
859 int ossl_cmp_msg_get_bodytype(const OSSL_CMP_MSG
*msg
);
860 OSSL_CMP_MSG
*ossl_cmp_msg_create(OSSL_CMP_CTX
*ctx
, int bodytype
);
861 OSSL_CMP_MSG
*ossl_cmp_certreq_new(OSSL_CMP_CTX
*ctx
, int bodytype
,
862 const OSSL_CRMF_MSG
*crm
);
863 OSSL_CMP_MSG
*ossl_cmp_certrep_new(OSSL_CMP_CTX
*ctx
, int bodytype
,
864 int certReqId
, OSSL_CMP_PKISI
*si
,
865 X509
*cert
, STACK_OF(X509
) *chain
,
866 STACK_OF(X509
) *caPubs
, int encrypted
,
867 int unprotectedErrors
);
868 OSSL_CMP_MSG
*ossl_cmp_rr_new(OSSL_CMP_CTX
*ctx
);
869 OSSL_CMP_MSG
*ossl_cmp_rp_new(OSSL_CMP_CTX
*ctx
, OSSL_CMP_PKISI
*si
,
870 OSSL_CRMF_CERTID
*certId
, int unprot_err
);
871 OSSL_CMP_MSG
*ossl_cmp_pkiconf_new(OSSL_CMP_CTX
*ctx
);
872 OSSL_CMP_MSG
*ossl_cmp_pollRep_new(OSSL_CMP_CTX
*ctx
, int crid
,
874 int ossl_cmp_msg_gen_push0_ITAV(OSSL_CMP_MSG
*msg
, OSSL_CMP_ITAV
*itav
);
875 int ossl_cmp_msg_gen_push1_ITAVs(OSSL_CMP_MSG
*msg
,
876 const STACK_OF(OSSL_CMP_ITAV
) *itavs
);
877 OSSL_CMP_MSG
*ossl_cmp_genm_new(OSSL_CMP_CTX
*ctx
);
878 OSSL_CMP_MSG
*ossl_cmp_genp_new(OSSL_CMP_CTX
*ctx
,
879 const STACK_OF(OSSL_CMP_ITAV
) *itavs
);
880 OSSL_CMP_MSG
*ossl_cmp_error_new(OSSL_CMP_CTX
*ctx
, OSSL_CMP_PKISI
*si
,
882 const char *details
, int unprotected
);
883 int ossl_cmp_certstatus_set0_certHash(OSSL_CMP_CERTSTATUS
*certStatus
,
884 ASN1_OCTET_STRING
*hash
);
885 OSSL_CMP_MSG
*ossl_cmp_certConf_new(OSSL_CMP_CTX
*ctx
, int fail_info
,
887 OSSL_CMP_MSG
*ossl_cmp_pollReq_new(OSSL_CMP_CTX
*ctx
, int crid
);
888 OSSL_CMP_MSG
*ossl_cmp_pollRep_new(OSSL_CMP_CTX
*ctx
, int crid
,
891 ossl_cmp_revrepcontent_get_pkisi(OSSL_CMP_REVREPCONTENT
*rrep
, int rsid
);
892 OSSL_CRMF_CERTID
*ossl_cmp_revrepcontent_get_CertId(OSSL_CMP_REVREPCONTENT
*rc
,
895 ossl_cmp_pollrepcontent_get0_pollrep(const OSSL_CMP_POLLREPCONTENT
*prc
,
897 OSSL_CMP_CERTRESPONSE
*
898 ossl_cmp_certrepmessage_get0_certresponse(const OSSL_CMP_CERTREPMESSAGE
*crm
,
900 X509
*ossl_cmp_certresponse_get1_cert(const OSSL_CMP_CERTRESPONSE
*crep
,
901 const OSSL_CMP_CTX
*ctx
, EVP_PKEY
*pkey
);
902 OSSL_CMP_MSG
*ossl_cmp_msg_load(const char *file
);
904 /* from cmp_protect.c */
905 int ossl_cmp_msg_add_extraCerts(OSSL_CMP_CTX
*ctx
, OSSL_CMP_MSG
*msg
);
906 ASN1_BIT_STRING
*ossl_cmp_calc_protection(const OSSL_CMP_CTX
*ctx
,
907 const OSSL_CMP_MSG
*msg
);
908 int ossl_cmp_msg_protect(OSSL_CMP_CTX
*ctx
, OSSL_CMP_MSG
*msg
);
911 typedef int (*ossl_cmp_allow_unprotected_cb_t
)(const OSSL_CMP_CTX
*ctx
,
912 const OSSL_CMP_MSG
*msg
,
913 int invalid_protection
, int arg
);
914 int ossl_cmp_msg_check_update(OSSL_CMP_CTX
*ctx
, const OSSL_CMP_MSG
*msg
,
915 ossl_cmp_allow_unprotected_cb_t cb
, int cb_arg
);
916 int ossl_cmp_msg_check_received(OSSL_CMP_CTX
*ctx
, const OSSL_CMP_MSG
*msg
,
917 ossl_cmp_allow_unprotected_cb_t cb
, int cb_arg
);
918 int ossl_cmp_verify_popo(const OSSL_CMP_CTX
*ctx
,
919 const OSSL_CMP_MSG
*msg
, int accept_RAVerified
);
921 /* from cmp_client.c */
922 int ossl_cmp_exchange_certConf(OSSL_CMP_CTX
*ctx
, int fail_info
,
924 int ossl_cmp_exchange_error(OSSL_CMP_CTX
*ctx
, int status
, int fail_info
,
925 const char *txt
, int errorCode
, const char *detail
);
927 #endif /* !defined(OSSL_CRYPTO_CMP_LOCAL_H) */