diff options
| author | tb <> | 2023-04-23 11:25:21 +0000 |
|---|---|---|
| committer | tb <> | 2023-04-23 11:25:21 +0000 |
| commit | 0d736aa8eb426f9e1fb0c6e8fa09cb32effd7f7f (patch) | |
| tree | e13ab1e35b796154f56004d188f5863ab0b3eb06 /src | |
| parent | a77795d252b58fa4bbaf3beec1fa1dac50f6785c (diff) | |
| download | openbsd-0d736aa8eb426f9e1fb0c6e8fa09cb32effd7f7f.tar.gz openbsd-0d736aa8eb426f9e1fb0c6e8fa09cb32effd7f7f.tar.bz2 openbsd-0d736aa8eb426f9e1fb0c6e8fa09cb32effd7f7f.zip | |
Initialize ishex and isneg at the top and drop some elses
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_utl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/libcrypto/x509/x509_utl.c b/src/lib/libcrypto/x509/x509_utl.c index b6f1919b39..f7b9c8586d 100644 --- a/src/lib/libcrypto/x509/x509_utl.c +++ b/src/lib/libcrypto/x509/x509_utl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_utl.c,v 1.10 2023/04/23 10:19:52 tb Exp $ */ | 1 | /* $OpenBSD: x509_utl.c,v 1.11 2023/04/23 11:25:21 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project. | 3 | * project. |
| 4 | */ | 4 | */ |
| @@ -241,7 +241,7 @@ s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value) | |||
| 241 | { | 241 | { |
| 242 | BIGNUM *bn = NULL; | 242 | BIGNUM *bn = NULL; |
| 243 | ASN1_INTEGER *aint; | 243 | ASN1_INTEGER *aint; |
| 244 | int isneg, ishex; | 244 | int isneg = 0, ishex = 0; |
| 245 | int ret; | 245 | int ret; |
| 246 | 246 | ||
| 247 | if (!value) { | 247 | if (!value) { |
| @@ -252,14 +252,12 @@ s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value) | |||
| 252 | if (value[0] == '-') { | 252 | if (value[0] == '-') { |
| 253 | value++; | 253 | value++; |
| 254 | isneg = 1; | 254 | isneg = 1; |
| 255 | } else | 255 | } |
| 256 | isneg = 0; | ||
| 257 | 256 | ||
| 258 | if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) { | 257 | if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) { |
| 259 | value += 2; | 258 | value += 2; |
| 260 | ishex = 1; | 259 | ishex = 1; |
| 261 | } else | 260 | } |
| 262 | ishex = 0; | ||
| 263 | 261 | ||
| 264 | if (ishex) | 262 | if (ishex) |
| 265 | ret = BN_hex2bn(&bn, value); | 263 | ret = BN_hex2bn(&bn, value); |
