~ubuntu-branches/ubuntu/raring/trousers/raring-proposed

« back to all changes in this revision

Viewing changes to src/tcs/rpc/tcstp/rpc_ek.c

  • Committer: Logan Rosen
  • Date: 2012-11-30 16:31:54 UTC
  • mfrom: (0.1.25 sid)
  • Revision ID: logatronico@gmail.com-20121130163154-jllqpry4lo24ol6p
* Merge from Debian unstable. Remaining changes:
  - debian/trousers.postinst: Reload udev rules to reload new users and
    groups.
* Dropped Ubuntu change in debian/trousers.prerm to make remove work,
  as Debian made a different one with the same goal that works as well.
* Imported Upstream version 0.3.10
* Update symbols file
* Force build of tools
* Fix regression introduced in previous patch, preventing removal
  (Closes: #680375)

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
43
43
                return TCSERR(TSS_E_INTERNAL_ERROR);
44
44
 
 
45
        if ((result = ctx_verify_context(hContext)))
 
46
                goto done;
 
47
 
45
48
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
46
49
 
47
50
        if (getData(TCSD_PACKET_TYPE_NONCE, 1, &antiReplay, 0, &data->comm))
84
87
                        return TCSERR(TSS_E_INTERNAL_ERROR);
85
88
                }
86
89
        } else
87
 
                initData(&data->comm, 0);
 
90
done:           initData(&data->comm, 0);
88
91
 
89
92
        data->comm.hdr.u.result = result;
90
93
        return TSS_SUCCESS;
103
106
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
104
107
                return TCSERR(TSS_E_INTERNAL_ERROR);
105
108
 
 
109
        if ((result = ctx_verify_context(hContext)))
 
110
                goto done;
 
111
 
106
112
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
107
113
 
108
114
        if (getData(TCSD_PACKET_TYPE_NONCE, 1, &antiReplay, 0, &data->comm))
129
135
                        return TCSERR(TSS_E_INTERNAL_ERROR);
130
136
                }
131
137
        } else
132
 
                initData(&data->comm, 0);
 
138
done:           initData(&data->comm, 0);
133
139
 
134
140
        data->comm.hdr.u.result = result;
135
141
        return TSS_SUCCESS;
147
153
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
148
154
                return TCSERR(TSS_E_INTERNAL_ERROR);
149
155
 
 
156
        if ((result = ctx_verify_context(hContext)))
 
157
                goto done;
 
158
 
150
159
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
151
160
 
152
161
        if (getData(TCSD_PACKET_TYPE_AUTH, 1, &auth, 0, &data->comm))
174
183
                }
175
184
                free(pubEK);
176
185
        } else
177
 
                initData(&data->comm, 0);
 
186
done:           initData(&data->comm, 0);
178
187
 
179
188
        data->comm.hdr.u.result = result;
180
189
        return TSS_SUCCESS;
231
240
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
232
241
                return TCSERR(TSS_E_INTERNAL_ERROR);
233
242
 
 
243
        if ((result = ctx_verify_context(hContext)))
 
244
                goto done;
 
245
 
234
246
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
235
247
 
236
248
        if (getData(TCSD_PACKET_TYPE_NONCE, 1, &antiReplay, 0, &data->comm))
287
299
                        return TCSERR(TSS_E_INTERNAL_ERROR);
288
300
                }
289
301
        } else
290
 
                initData(&data->comm, 0);
 
302
done:           initData(&data->comm, 0);
291
303
 
292
304
        data->comm.hdr.u.result = result;
293
305
 
304
316
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
305
317
                return TCSERR(TSS_E_INTERNAL_ERROR);
306
318
 
 
319
        if ((result = ctx_verify_context(hContext)))
 
320
                goto done;
 
321
 
307
322
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
308
323
 
309
324
        if (getData(TCSD_PACKET_TYPE_DIGEST, 1, &eKResetAuth, 0, &data->comm))
314
329
        result = TCSP_RevokeEndorsementKeyPair_Internal(hContext, eKResetAuth);
315
330
 
316
331
        MUTEX_UNLOCK(tcsp_lock);
317
 
 
 
332
done:
318
333
        initData(&data->comm, 0);
319
334
 
320
335
        data->comm.hdr.u.result = result;