Rich Salz | 846e33c | 2016-05-17 14:18:30 -0400 | [diff] [blame] | 1 | /* |
Matt Caswell | 6738bf1 | 2018-02-13 12:51:29 +0000 | [diff] [blame] | 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 3 | * |
Rich Salz | 846e33c | 2016-05-17 14:18:30 -0400 | [diff] [blame] | 4 | * Licensed under the OpenSSL license (the "License"). You may not use |
| 5 | * this file except in compliance with the License. You can obtain a copy |
| 6 | * in the file LICENSE in the source distribution or at |
| 7 | * https://www.openssl.org/source/license.html |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
Rich Salz | effaf4d | 2016-01-31 13:08:23 -0500 | [diff] [blame] | 10 | #include <openssl/opensslconf.h> |
| 11 | #ifdef OPENSSL_NO_DSA |
| 12 | NON_EMPTY_TRANSLATION_UNIT |
| 13 | #else |
Geoff Thorpe | 5daec7e | 2002-12-08 05:38:44 +0000 | [diff] [blame] | 14 | |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 15 | # include <stdio.h> |
| 16 | # include <stdlib.h> |
| 17 | # include <time.h> |
| 18 | # include <string.h> |
| 19 | # include "apps.h" |
Richard Levitte | dab2cd6 | 2018-01-31 11:13:10 +0100 | [diff] [blame] | 20 | # include "progs.h" |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 21 | # include <openssl/bio.h> |
| 22 | # include <openssl/err.h> |
| 23 | # include <openssl/bn.h> |
| 24 | # include <openssl/dsa.h> |
| 25 | # include <openssl/x509.h> |
| 26 | # include <openssl/pem.h> |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 27 | |
Rich Salz | 6d23cf9 | 2015-01-12 17:29:26 -0500 | [diff] [blame] | 28 | static int dsa_cb(int p, int n, BN_GENCB *cb); |
Ralf S. Engelschall | 667ac4e | 2000-02-11 09:47:18 +0000 | [diff] [blame] | 29 | |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 30 | typedef enum OPTION_choice { |
| 31 | OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, |
| 32 | OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_TEXT, OPT_C, |
Rich Salz | 3ee1eac | 2017-07-05 10:58:48 -0400 | [diff] [blame] | 33 | OPT_NOOUT, OPT_GENKEY, OPT_ENGINE, OPT_R_ENUM |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 34 | } OPTION_CHOICE; |
Ralf S. Engelschall | 667ac4e | 2000-02-11 09:47:18 +0000 | [diff] [blame] | 35 | |
FdaSilvaYY | 44c83eb | 2016-03-13 14:07:50 +0100 | [diff] [blame] | 36 | const OPTIONS dsaparam_options[] = { |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 37 | {"help", OPT_HELP, '-', "Display this summary"}, |
| 38 | {"inform", OPT_INFORM, 'F', "Input format - DER or PEM"}, |
| 39 | {"in", OPT_IN, '<', "Input file"}, |
| 40 | {"outform", OPT_OUTFORM, 'F', "Output format - DER or PEM"}, |
| 41 | {"out", OPT_OUT, '>', "Output file"}, |
| 42 | {"text", OPT_TEXT, '-', "Print as text"}, |
| 43 | {"C", OPT_C, '-', "Output C code"}, |
| 44 | {"noout", OPT_NOOUT, '-', "No output"}, |
| 45 | {"genkey", OPT_GENKEY, '-', "Generate a DSA key"}, |
Rich Salz | 3ee1eac | 2017-07-05 10:58:48 -0400 | [diff] [blame] | 46 | OPT_R_OPTIONS, |
Rich Salz | 9c3bcfa | 2015-05-15 13:50:38 -0400 | [diff] [blame] | 47 | # ifndef OPENSSL_NO_ENGINE |
| 48 | {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, |
| 49 | # endif |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 50 | {NULL} |
| 51 | }; |
| 52 | |
| 53 | int dsaparam_main(int argc, char **argv) |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 54 | { |
Richard Levitte | dd1abd4 | 2016-09-28 23:39:18 +0200 | [diff] [blame] | 55 | ENGINE *e = NULL; |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 56 | DSA *dsa = NULL; |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 57 | BIO *in = NULL, *out = NULL; |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 58 | BN_GENCB *cb = NULL; |
Rich Salz | 3ee1eac | 2017-07-05 10:58:48 -0400 | [diff] [blame] | 59 | int numbits = -1, num = 0, genkey = 0; |
Rich Salz | 3b061a0 | 2015-05-02 10:01:33 -0400 | [diff] [blame] | 60 | int informat = FORMAT_PEM, outformat = FORMAT_PEM, noout = 0, C = 0; |
| 61 | int ret = 1, i, text = 0, private = 0; |
Rich Salz | 3ee1eac | 2017-07-05 10:58:48 -0400 | [diff] [blame] | 62 | char *infile = NULL, *outfile = NULL, *prog; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 63 | OPTION_CHOICE o; |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 64 | |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 65 | prog = opt_init(argc, argv, dsaparam_options); |
| 66 | while ((o = opt_next()) != OPT_EOF) { |
| 67 | switch (o) { |
| 68 | case OPT_EOF: |
| 69 | case OPT_ERR: |
| 70 | opthelp: |
| 71 | BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); |
| 72 | goto end; |
| 73 | case OPT_HELP: |
| 74 | opt_help(dsaparam_options); |
| 75 | ret = 0; |
| 76 | goto end; |
| 77 | case OPT_INFORM: |
| 78 | if (!opt_format(opt_arg(), OPT_FMT_PEMDER, &informat)) |
| 79 | goto opthelp; |
| 80 | break; |
| 81 | case OPT_IN: |
| 82 | infile = opt_arg(); |
| 83 | break; |
| 84 | case OPT_OUTFORM: |
| 85 | if (!opt_format(opt_arg(), OPT_FMT_PEMDER, &outformat)) |
| 86 | goto opthelp; |
| 87 | break; |
| 88 | case OPT_OUT: |
| 89 | outfile = opt_arg(); |
| 90 | break; |
| 91 | case OPT_ENGINE: |
Richard Levitte | dd1abd4 | 2016-09-28 23:39:18 +0200 | [diff] [blame] | 92 | e = setup_engine(opt_arg(), 0); |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 93 | break; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 94 | case OPT_TEXT: |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 95 | text = 1; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 96 | break; |
| 97 | case OPT_C: |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 98 | C = 1; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 99 | break; |
| 100 | case OPT_GENKEY: |
Rich Salz | 3ee1eac | 2017-07-05 10:58:48 -0400 | [diff] [blame] | 101 | genkey = 1; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 102 | break; |
Rich Salz | 3ee1eac | 2017-07-05 10:58:48 -0400 | [diff] [blame] | 103 | case OPT_R_CASES: |
| 104 | if (!opt_rand(o)) |
| 105 | goto end; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 106 | break; |
| 107 | case OPT_NOOUT: |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 108 | noout = 1; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 109 | break; |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 110 | } |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 111 | } |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 112 | argc = opt_num_rest(); |
| 113 | argv = opt_rest(); |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 114 | |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 115 | if (argc == 1) { |
Rich Salz | bd4850d | 2016-01-11 20:40:38 -0500 | [diff] [blame] | 116 | if (!opt_int(argv[0], &num) || num < 0) |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 117 | goto end; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 118 | /* generate a key */ |
| 119 | numbits = num; |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 120 | } |
Rich Salz | 3b061a0 | 2015-05-02 10:01:33 -0400 | [diff] [blame] | 121 | private = genkey ? 1 : 0; |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 122 | |
Richard Levitte | bdd58d9 | 2015-09-04 12:49:06 +0200 | [diff] [blame] | 123 | in = bio_open_default(infile, 'r', informat); |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 124 | if (in == NULL) |
| 125 | goto end; |
Richard Levitte | bdd58d9 | 2015-09-04 12:49:06 +0200 | [diff] [blame] | 126 | out = bio_open_owner(outfile, outformat, private); |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 127 | if (out == NULL) |
| 128 | goto end; |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 129 | |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 130 | if (numbits > 0) { |
| 131 | cb = BN_GENCB_new(); |
Matt Caswell | 96487cd | 2015-10-30 11:18:04 +0000 | [diff] [blame] | 132 | if (cb == NULL) { |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 133 | BIO_printf(bio_err, "Error allocating BN_GENCB object\n"); |
| 134 | goto end; |
| 135 | } |
| 136 | BN_GENCB_set(cb, dsa_cb, bio_err); |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 137 | dsa = DSA_new(); |
Matt Caswell | 96487cd | 2015-10-30 11:18:04 +0000 | [diff] [blame] | 138 | if (dsa == NULL) { |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 139 | BIO_printf(bio_err, "Error allocating DSA object\n"); |
| 140 | goto end; |
| 141 | } |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 142 | BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n", |
| 143 | num); |
| 144 | BIO_printf(bio_err, "This could take some time\n"); |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 145 | if (!DSA_generate_parameters_ex(dsa, num, NULL, 0, NULL, NULL, cb)) { |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 146 | ERR_print_errors(bio_err); |
| 147 | BIO_printf(bio_err, "Error, DSA key generation failed\n"); |
| 148 | goto end; |
| 149 | } |
Paul Yang | 2234212 | 2017-06-13 01:24:02 +0800 | [diff] [blame] | 150 | } else if (informat == FORMAT_ASN1) { |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 151 | dsa = d2i_DSAparams_bio(in, NULL); |
Paul Yang | 2234212 | 2017-06-13 01:24:02 +0800 | [diff] [blame] | 152 | } else { |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 153 | dsa = PEM_read_bio_DSAparams(in, NULL, NULL, NULL); |
Paul Yang | 2234212 | 2017-06-13 01:24:02 +0800 | [diff] [blame] | 154 | } |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 155 | if (dsa == NULL) { |
| 156 | BIO_printf(bio_err, "unable to load DSA parameters\n"); |
| 157 | ERR_print_errors(bio_err); |
| 158 | goto end; |
| 159 | } |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 160 | |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 161 | if (text) { |
| 162 | DSAparams_print(out, dsa); |
| 163 | } |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 164 | |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 165 | if (C) { |
Richard Levitte | 2ac6115 | 2016-06-14 15:49:05 +0200 | [diff] [blame] | 166 | const BIGNUM *p = NULL, *q = NULL, *g = NULL; |
Viktor Dukhovni | ae6c553 | 2016-04-03 20:58:09 -0400 | [diff] [blame] | 167 | unsigned char *data; |
Matt Caswell | 6e9fa57 | 2016-03-30 17:18:55 +0100 | [diff] [blame] | 168 | int len, bits_p; |
| 169 | |
| 170 | DSA_get0_pqg(dsa, &p, &q, &g); |
| 171 | len = BN_num_bytes(p); |
| 172 | bits_p = BN_num_bits(p); |
| 173 | |
Viktor Dukhovni | ae6c553 | 2016-04-03 20:58:09 -0400 | [diff] [blame] | 174 | data = app_malloc(len + 20, "BN space"); |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 175 | |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 176 | BIO_printf(bio_out, "DSA *get_dsa%d()\n{\n", bits_p); |
Matt Caswell | 6e9fa57 | 2016-03-30 17:18:55 +0100 | [diff] [blame] | 177 | print_bignum_var(bio_out, p, "dsap", len, data); |
| 178 | print_bignum_var(bio_out, q, "dsaq", len, data); |
| 179 | print_bignum_var(bio_out, g, "dsag", len, data); |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 180 | BIO_printf(bio_out, " DSA *dsa = DSA_new();\n" |
| 181 | "\n"); |
| 182 | BIO_printf(bio_out, " if (dsa == NULL)\n" |
| 183 | " return NULL;\n"); |
Rich Salz | cbe2964 | 2017-12-07 13:39:34 -0500 | [diff] [blame] | 184 | BIO_printf(bio_out, " dsa->p = BN_bin2bn(dsap_%d, sizeof(dsap_%d), NULL);\n", |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 185 | bits_p, bits_p); |
Rich Salz | cbe2964 | 2017-12-07 13:39:34 -0500 | [diff] [blame] | 186 | BIO_printf(bio_out, " dsa->q = BN_bin2bn(dsaq_%d, sizeof(dsaq_%d), NULL);\n", |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 187 | bits_p, bits_p); |
Rich Salz | cbe2964 | 2017-12-07 13:39:34 -0500 | [diff] [blame] | 188 | BIO_printf(bio_out, " dsa->g = BN_bin2bn(dsag_%d, sizeof(dsag_%d), NULL);\n", |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 189 | bits_p, bits_p); |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 190 | BIO_printf(bio_out, " if (!dsa->p || !dsa->q || !dsa->g) {\n" |
| 191 | " DSA_free(dsa);\n" |
| 192 | " return NULL;\n" |
| 193 | " }\n" |
| 194 | " return(dsa);\n}\n"); |
Matt Caswell | a855d1a | 2016-04-27 14:54:58 +0100 | [diff] [blame] | 195 | OPENSSL_free(data); |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 196 | } |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 197 | |
Bernd Edlinger | 5281435 | 2018-03-25 12:50:17 +0200 | [diff] [blame] | 198 | if (outformat == FORMAT_ASN1 && genkey) |
| 199 | noout = 1; |
| 200 | |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 201 | if (!noout) { |
| 202 | if (outformat == FORMAT_ASN1) |
| 203 | i = i2d_DSAparams_bio(out, dsa); |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 204 | else |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 205 | i = PEM_write_bio_DSAparams(out, dsa); |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 206 | if (!i) { |
| 207 | BIO_printf(bio_err, "unable to write DSA parameters\n"); |
| 208 | ERR_print_errors(bio_err); |
| 209 | goto end; |
| 210 | } |
| 211 | } |
| 212 | if (genkey) { |
| 213 | DSA *dsakey; |
Ralf S. Engelschall | dfeab06 | 1998-12-21 11:00:56 +0000 | [diff] [blame] | 214 | |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 215 | if ((dsakey = DSAparams_dup(dsa)) == NULL) |
| 216 | goto end; |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 217 | if (!DSA_generate_key(dsakey)) { |
| 218 | ERR_print_errors(bio_err); |
| 219 | DSA_free(dsakey); |
| 220 | goto end; |
| 221 | } |
Rich Salz | 3b061a0 | 2015-05-02 10:01:33 -0400 | [diff] [blame] | 222 | assert(private); |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 223 | if (outformat == FORMAT_ASN1) |
| 224 | i = i2d_DSAPrivateKey_bio(out, dsakey); |
Rich Salz | 7e1b748 | 2015-04-24 15:26:15 -0400 | [diff] [blame] | 225 | else |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 226 | i = PEM_write_bio_DSAPrivateKey(out, dsakey, NULL, NULL, 0, NULL, |
| 227 | NULL); |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 228 | DSA_free(dsakey); |
| 229 | } |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 230 | ret = 0; |
| 231 | end: |
Rich Salz | 23a1d5e | 2015-04-30 21:37:06 -0400 | [diff] [blame] | 232 | BN_GENCB_free(cb); |
Rich Salz | ca3a82c | 2015-03-25 11:31:18 -0400 | [diff] [blame] | 233 | BIO_free(in); |
| 234 | BIO_free_all(out); |
Rich Salz | d640708 | 2015-03-24 10:17:37 -0400 | [diff] [blame] | 235 | DSA_free(dsa); |
Richard Levitte | dd1abd4 | 2016-09-28 23:39:18 +0200 | [diff] [blame] | 236 | release_engine(e); |
KaoruToda | 26a7d93 | 2017-10-17 23:04:09 +0900 | [diff] [blame] | 237 | return ret; |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 238 | } |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 239 | |
Rich Salz | 6d23cf9 | 2015-01-12 17:29:26 -0500 | [diff] [blame] | 240 | static int dsa_cb(int p, int n, BN_GENCB *cb) |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 241 | { |
| 242 | char c = '*'; |
Ralf S. Engelschall | d02b48c | 1998-12-21 10:52:47 +0000 | [diff] [blame] | 243 | |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 244 | if (p == 0) |
| 245 | c = '.'; |
| 246 | if (p == 1) |
| 247 | c = '+'; |
| 248 | if (p == 2) |
| 249 | c = '*'; |
| 250 | if (p == 3) |
| 251 | c = '\n'; |
| 252 | BIO_write(BN_GENCB_get_arg(cb), &c, 1); |
| 253 | (void)BIO_flush(BN_GENCB_get_arg(cb)); |
Matt Caswell | 0f113f3 | 2015-01-22 03:40:55 +0000 | [diff] [blame] | 254 | return 1; |
| 255 | } |
Ulf Möller | f5d7a03 | 1999-04-27 01:14:46 +0000 | [diff] [blame] | 256 | #endif |