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

« back to all changes in this revision

Viewing changes to crypto/engine/eng_cnf.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:
1
1
/* eng_cnf.c */
2
 
/* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL
 
2
/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3
3
 * project 2001.
4
4
 */
5
5
/* ====================================================================
98
98
        CONF_VALUE *ecmd;
99
99
        char *ctrlname, *ctrlvalue;
100
100
        ENGINE *e = NULL;
 
101
        int soft = 0;
 
102
 
101
103
        name = skip_dot(name);
102
104
#ifdef ENGINE_CONF_DEBUG
103
105
        fprintf(stderr, "Configuring engine %s\n", name);
125
127
                /* Override engine name to use */
126
128
                if (!strcmp(ctrlname, "engine_id"))
127
129
                        name = ctrlvalue;
 
130
                else if (!strcmp(ctrlname, "soft_load"))
 
131
                        soft = 1;
128
132
                /* Load a dynamic ENGINE */
129
133
                else if (!strcmp(ctrlname, "dynamic_path"))
130
134
                        {
147
151
                        if (!e)
148
152
                                {
149
153
                                e = ENGINE_by_id(name);
 
154
                                if (!e && soft)
 
155
                                        {
 
156
                                        ERR_clear_error();
 
157
                                        return 1;
 
158
                                        }
150
159
                                if (!e)
151
160
                                        return 0;
152
161
                                }