Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame^] | 1 | /* |
| 2 | * pkey.h |
| 3 | * |
| 4 | * Copyright (C) AB Strakt 2001, All rights reserved |
| 5 | * |
| 6 | * Export pkey functions and data structure. |
| 7 | * See the file RATIONALE for a short explanation of why this module was written. |
| 8 | * |
| 9 | * @(#) $Id: pkey.h,v 1.5 2002/09/04 22:24:59 iko Exp $ |
| 10 | */ |
| 11 | #ifndef PyOpenSSL_crypto_PKEY_H_ |
| 12 | #define PyOpenSSL_crypto_PKEY_H_ |
| 13 | |
| 14 | extern int init_crypto_pkey (PyObject *); |
| 15 | |
| 16 | extern PyTypeObject crypto_PKey_Type; |
| 17 | |
| 18 | #define crypto_PKey_Check(v) ((v)->ob_type == &crypto_PKey_Type) |
| 19 | |
| 20 | typedef struct { |
| 21 | PyObject_HEAD |
| 22 | EVP_PKEY *pkey; |
| 23 | int dealloc; |
| 24 | } crypto_PKeyObj; |
| 25 | |
| 26 | #define crypto_TYPE_RSA EVP_PKEY_RSA |
| 27 | #define crypto_TYPE_DSA EVP_PKEY_DSA |
| 28 | |
| 29 | #endif |