Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 /* -*- Mode: C; tab-width: 8 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "crmf.h"
8 #include "crmfi.h"
10 SECStatus
11 CRMF_EncodeCertReqMsg(CRMFCertReqMsg *inCertReqMsg,
12 CRMFEncoderOutputCallback fn,
13 void *arg)
14 {
15 struct crmfEncoderOutput output;
17 output.fn = fn;
18 output.outputArg = arg;
19 return SEC_ASN1Encode(inCertReqMsg,CRMFCertReqMsgTemplate,
20 crmf_encoder_out, &output);
22 }
25 SECStatus
26 CRMF_EncodeCertRequest(CRMFCertRequest *inCertReq,
27 CRMFEncoderOutputCallback fn,
28 void *arg)
29 {
30 struct crmfEncoderOutput output;
32 output.fn = fn;
33 output.outputArg = arg;
34 return SEC_ASN1Encode(inCertReq, CRMFCertRequestTemplate,
35 crmf_encoder_out, &output);
36 }
38 SECStatus
39 CRMF_EncodeCertReqMessages(CRMFCertReqMsg **inCertReqMsgs,
40 CRMFEncoderOutputCallback fn,
41 void *arg)
42 {
43 struct crmfEncoderOutput output;
44 CRMFCertReqMessages msgs;
46 output.fn = fn;
47 output.outputArg = arg;
48 msgs.messages = inCertReqMsgs;
49 return SEC_ASN1Encode(&msgs, CRMFCertReqMessagesTemplate,
50 crmf_encoder_out, &output);
51 }