equal
deleted
inserted
replaced
120 * Returns 0 on success or a negative value if an error occurs. |
120 * Returns 0 on success or a negative value if an error occurs. |
121 */ |
121 */ |
122 EXPORT_C |
122 EXPORT_C |
123 int |
123 int |
124 xmlSecDSigCtxInitialize(xmlSecDSigCtxPtr dsigCtx, xmlSecKeysMngrPtr keysMngr) { |
124 xmlSecDSigCtxInitialize(xmlSecDSigCtxPtr dsigCtx, xmlSecKeysMngrPtr keysMngr) { |
125 int ret; |
125 int ret,ret1; |
126 |
126 |
127 xmlSecAssert2(dsigCtx != NULL, -1); |
127 xmlSecAssert2(dsigCtx != NULL, -1); |
128 |
128 |
129 memset(dsigCtx, 0, sizeof(xmlSecDSigCtx)); |
129 memset(dsigCtx, 0, sizeof(xmlSecDSigCtx)); |
130 |
130 |
163 XMLSEC_ERRORS_NO_MESSAGE); |
163 XMLSEC_ERRORS_NO_MESSAGE); |
164 return(-1); |
164 return(-1); |
165 } |
165 } |
166 |
166 |
167 /* references lists from SignedInfo and Manifest elements */ |
167 /* references lists from SignedInfo and Manifest elements */ |
168 xmlSecPtrListInitialize(&(dsigCtx->signedInfoReferences), |
168 ret=xmlSecPtrListInitialize(&(dsigCtx->signedInfoReferences), |
169 xmlSecDSigReferenceCtxListId); |
169 xmlSecDSigReferenceCtxListId); |
170 xmlSecPtrListInitialize(&(dsigCtx->manifestReferences), |
170 ret1=xmlSecPtrListInitialize(&(dsigCtx->manifestReferences), |
171 xmlSecDSigReferenceCtxListId); |
171 xmlSecDSigReferenceCtxListId); |
|
172 if(ret<0 ||ret1<0) |
|
173 { |
|
174 xmlSecError(XMLSEC_ERRORS_HERE, |
|
175 NULL, |
|
176 "xmlSecTransformCtxInitialize", |
|
177 XMLSEC_ERRORS_R_XMLSEC_FAILED, |
|
178 XMLSEC_ERRORS_NO_MESSAGE); |
|
179 return(-1); |
|
180 } |
172 |
181 |
173 dsigCtx->enabledReferenceUris = xmlSecTransformUriTypeAny; |
182 dsigCtx->enabledReferenceUris = xmlSecTransformUriTypeAny; |
174 return(0); |
183 return(0); |
175 } |
184 } |
176 |
185 |