michael@0: /* -*- Mode: C; tab-width: 8 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #include "crmf.h" michael@0: #include "crmfi.h" michael@0: michael@0: SECStatus michael@0: CRMF_EncodeCertReqMsg(CRMFCertReqMsg *inCertReqMsg, michael@0: CRMFEncoderOutputCallback fn, michael@0: void *arg) michael@0: { michael@0: struct crmfEncoderOutput output; michael@0: michael@0: output.fn = fn; michael@0: output.outputArg = arg; michael@0: return SEC_ASN1Encode(inCertReqMsg,CRMFCertReqMsgTemplate, michael@0: crmf_encoder_out, &output); michael@0: michael@0: } michael@0: michael@0: michael@0: SECStatus michael@0: CRMF_EncodeCertRequest(CRMFCertRequest *inCertReq, michael@0: CRMFEncoderOutputCallback fn, michael@0: void *arg) michael@0: { michael@0: struct crmfEncoderOutput output; michael@0: michael@0: output.fn = fn; michael@0: output.outputArg = arg; michael@0: return SEC_ASN1Encode(inCertReq, CRMFCertRequestTemplate, michael@0: crmf_encoder_out, &output); michael@0: } michael@0: michael@0: SECStatus michael@0: CRMF_EncodeCertReqMessages(CRMFCertReqMsg **inCertReqMsgs, michael@0: CRMFEncoderOutputCallback fn, michael@0: void *arg) michael@0: { michael@0: struct crmfEncoderOutput output; michael@0: CRMFCertReqMessages msgs; michael@0: michael@0: output.fn = fn; michael@0: output.outputArg = arg; michael@0: msgs.messages = inCertReqMsgs; michael@0: return SEC_ASN1Encode(&msgs, CRMFCertReqMessagesTemplate, michael@0: crmf_encoder_out, &output); michael@0: } michael@0: michael@0: michael@0: michael@0: