~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/engine/eng_pkey.c

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-12-06 20:16:24 UTC
  • mfrom: (11.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091206201624-u126qjpqm2n2uuhu
Tags: 0.9.8k-7ubuntu1
* Merge from debian unstable, remaining changes (LP: #493392):
  - Link using -Bsymbolic-functions
  - Add support for lpia
  - Disable SSLv2 during compile
  - Ship documentation in openssl-doc, suggested by the package.
  - Use a different priority for libssl0.9.8/restart-services
    depending on whether a desktop, or server dist-upgrade is being
    performed.
  - Display a system restart required notification bubble on libssl0.9.8
    upgrade.
  - Replace duplicate files in the doc directory with symlinks.
  - Move runtime libraries to /lib, for the benefit of wpasupplicant
* Strip the patches out of the source into quilt patches
* Disable CVE-2009-3555.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
        return 1;
70
70
        }
71
71
 
 
72
int ENGINE_set_load_ssl_client_cert_function(ENGINE *e,
 
73
                                ENGINE_SSL_CLIENT_CERT_PTR loadssl_f)
 
74
        {
 
75
        e->load_ssl_client_cert = loadssl_f;
 
76
        return 1;
 
77
        }
 
78
 
72
79
ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e)
73
80
        {
74
81
        return e->load_privkey;
79
86
        return e->load_pubkey;
80
87
        }
81
88
 
 
89
ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e)
 
90
        {
 
91
        return e->load_ssl_client_cert;
 
92
        }
 
93
 
82
94
/* API functions to load public/private keys */
83
95
 
84
96
EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
152
164
                }
153
165
        return pkey;
154
166
        }
 
167
 
 
168
int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s,
 
169
        STACK_OF(X509_NAME) *ca_dn, X509 **pcert, EVP_PKEY **ppkey,
 
170
        STACK_OF(X509) **pother, UI_METHOD *ui_method, void *callback_data)
 
171
        {
 
172
 
 
173
        if(e == NULL)
 
174
                {
 
175
                ENGINEerr(ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT,
 
176
                        ERR_R_PASSED_NULL_PARAMETER);
 
177
                return 0;
 
178
                }
 
179
        CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
 
180
        if(e->funct_ref == 0)
 
181
                {
 
182
                CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 
183
                ENGINEerr(ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT,
 
184
                        ENGINE_R_NOT_INITIALISED);
 
185
                return 0;
 
186
                }
 
187
        CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
 
188
        if (!e->load_ssl_client_cert)
 
189
                {
 
190
                ENGINEerr(ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT,
 
191
                        ENGINE_R_NO_LOAD_FUNCTION);
 
192
                return 0;
 
193
                }
 
194
        return e->load_ssl_client_cert(e, s, ca_dn, pcert, ppkey, pother,
 
195
                                        ui_method, callback_data);
 
196
        }