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

« back to all changes in this revision

Viewing changes to ssl/ssl_sess.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
#include <stdio.h>
60
60
#include <openssl/lhash.h>
61
61
#include <openssl/rand.h>
 
62
#ifndef OPENSSL_NO_ENGINE
 
63
#include <openssl/engine.h>
 
64
#endif
62
65
#include "ssl_locl.h"
63
66
 
64
67
static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
870
873
        return ctx->client_cert_cb;
871
874
        }
872
875
 
 
876
#ifndef OPENSSL_NO_ENGINE
 
877
int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e)
 
878
        {
 
879
        if (!ENGINE_init(e))
 
880
                {
 
881
                SSLerr(SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE, ERR_R_ENGINE_LIB);
 
882
                return 0;
 
883
                }
 
884
        if(!ENGINE_get_ssl_client_cert_function(e))
 
885
                {
 
886
                SSLerr(SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE, SSL_R_NO_CLIENT_CERT_METHOD);
 
887
                ENGINE_finish(e);
 
888
                return 0;
 
889
                }
 
890
        ctx->client_cert_engine = e;
 
891
        return 1;
 
892
        }
 
893
#endif
 
894
 
873
895
void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,
874
896
        int (*cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len))
875
897
        {