summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-11-11 13:58:41 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-11-11 13:58:41 +0000
commit53b1899e3cc0ef640643d52599ed94e6d89b20e1 (patch)
tree8bad2e0ab03916b0f9e8839794826ae56698d2a6 /apps
parent174a4a8c899fcb7f553e56c095613f47fde5dc43 (diff)
Fix a couple of outstanding issues: update STATUS file, fix NO_FP_API problems.
Update docs, change 'ca' to use the new callback parameter. Now moved key_callback into app.c because some other utilities will use it soon.
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c11
-rw-r--r--apps/apps.h1
-rw-r--r--apps/ca.c16
3 files changed, 14 insertions, 14 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 8fb5e8aaa7..3a27f2c6f1 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -324,3 +324,14 @@ int app_init(long mesgwin)
return(1);
}
#endif
+
+int MS_CALLBACK key_callback(char *buf, int len, int verify, void *key)
+ {
+ int i;
+
+ if (key == NULL) return(0);
+ i=strlen(key);
+ i=(i > len)?len:i;
+ memcpy(buf,key,i);
+ return(i);
+ }
diff --git a/apps/apps.h b/apps/apps.h
index ce1f0fd9af..0bdf469f0b 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -142,6 +142,7 @@ int args_from_file(char *file, int *argc, char **argv[]);
int str2fmt(char *s);
void program_name(char *in,char *out,int size);
int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]);
+int MS_CALLBACK key_callback(char *buf,int len,int verify,void *u);
#define FORMAT_UNDEF 0
#define FORMAT_ASN1 1
#define FORMAT_TEXT 2
diff --git a/apps/ca.c b/apps/ca.c
index fc3fae2c19..d724d09407 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -178,7 +178,6 @@ extern int EF_ALIGNMENT;
static int add_oid_section(LHASH *conf);
static void lookup_fail(char *name,char *tag);
-static int MS_CALLBACK key_callback(char *buf,int len,int verify,void *u);
static unsigned long index_serial_hash(char **a);
static int index_serial_cmp(char **a, char **b);
static unsigned long index_name_hash(char **a);
@@ -209,7 +208,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
static int do_revoke(X509 *x509, TXT_DB *db);
static int check_time_format(char *str);
static LHASH *conf=NULL;
-static char *key=NULL;
static char *section=NULL;
static int preserve=0;
@@ -217,6 +215,7 @@ static int msie_hack=0;
int MAIN(int argc, char **argv)
{
+ char *key=NULL;
int total=0;
int total_done=0;
int badops=0;
@@ -535,7 +534,7 @@ bad:
pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL);
else
{
- pkey=PEM_read_bio_PrivateKey(in,NULL,key_callback,NULL);
+ pkey=PEM_read_bio_PrivateKey(in,NULL,key_callback,key);
memset(key,0,strlen(key));
}
if (pkey == NULL)
@@ -1250,17 +1249,6 @@ static void lookup_fail(char *name, char *tag)
BIO_printf(bio_err,"variable lookup failed for %s::%s\n",name,tag);
}
-static int MS_CALLBACK key_callback(char *buf, int len, int verify, void *u)
- {
- int i;
-
- if (key == NULL) return(0);
- i=strlen(key);
- i=(i > len)?len:i;
- memcpy(buf,key,i);
- return(i);
- }
-
static unsigned long index_serial_hash(char **a)
{
char *n;