~ubuntu-branches/ubuntu/saucy/m2crypto/saucy

« back to all changes in this revision

Viewing changes to SWIG/_ec.i

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-06 01:28:39 UTC
  • mfrom: (2.2.5 sid)
  • Revision ID: james.westby@ubuntu.com-20091106012839-zjjugwmj8zggokqh
Tags: 0.20.1-1ubuntu1
* Merge from debian testing, remaining changes:
  - debian/rules; enable testsuite, add more files to "clean" rule.
  - tests/test_ssl.py: use signal 9 to kill old s_server processes
    to work around build HUP signal-ignore-mask (LP: #451998).

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
 
190
190
    return pyo;
191
191
}
 
192
%}
192
193
 
 
194
%threadallow ec_key_read_pubkey;
 
195
%inline %{
193
196
EC_KEY *ec_key_read_pubkey(BIO *f) {
194
197
    return PEM_read_bio_EC_PUBKEY(f, NULL, NULL, NULL);   
195
198
}
 
199
%}
196
200
 
 
201
%threadallow ec_key_write_pubkey;
 
202
%inline %{
197
203
int ec_key_write_pubkey(EC_KEY *key, BIO *f) {
198
204
    return PEM_write_bio_EC_PUBKEY(f, key );
199
205
}
 
206
%}
200
207
 
 
208
%threadallow ec_key_read_bio;
 
209
%inline %{
201
210
EC_KEY *ec_key_read_bio(BIO *f, PyObject *pyfunc) {
202
211
    EC_KEY *ret;
203
212
 
206
215
    Py_DECREF(pyfunc);
207
216
    return ret;
208
217
}
 
218
%}
209
219
 
 
220
%threadallow ec_key_write_bio;
 
221
%inline %{
210
222
int ec_key_write_bio(EC_KEY *key, BIO *f, EVP_CIPHER *cipher, PyObject *pyfunc) {
211
223
    int ret;
212
224
 
216
228
    Py_DECREF(pyfunc);
217
229
    return ret;
218
230
}
 
231
%}
219
232
 
 
233
%threadallow ec_key_write_bio_no_cipher;
 
234
%inline %{
220
235
int ec_key_write_bio_no_cipher(EC_KEY *key, BIO *f, PyObject *pyfunc) {
221
236
    int ret;
222
237