Add currently failing negative zero check to BN_rshift() regress.
authorjsing <jsing@openbsd.org>
Mon, 13 Feb 2023 04:00:39 +0000 (04:00 +0000)
committerjsing <jsing@openbsd.org>
Mon, 13 Feb 2023 04:00:39 +0000 (04:00 +0000)
regress/lib/libcrypto/bn/bn_shift.c

index 15359db..88d0e65 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: bn_shift.c,v 1.7 2023/01/07 14:30:57 jsing Exp $ */
+/*     $OpenBSD: bn_shift.c,v 1.8 2023/02/13 04:00:39 jsing Exp $ */
 /*
  * Copyright (c) 2022 Joel Sing <jsing@openbsd.org>
  *
@@ -341,6 +341,10 @@ test_bn_rshift_to_zero(void)
                fprintf(stderr, "FAIL: BN is not zero\n");
                goto failure;
        }
+       if (BN_is_negative(bn1)) {
+               fprintf(stderr, "FAIL: BN is negative zero\n");
+               goto failure;
+       }
 
        failed = 0;