summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/asn1_gen.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-04-13 15:58:28 -0400
committerRich Salz <rsalz@openssl.org>2016-04-18 09:02:11 -0400
commit14f051a0ae3d752c50f419d3583e85fdf4c5bfc9 (patch)
tree16bb50151db9c67cd1dec3b1d25cc537fd10f874 /crypto/asn1/asn1_gen.c
parent9021a5dfb37fd3a6f7726f07ef0f27dcb71048e2 (diff)
Make string_to_hex/hex_to_string public
Give the API new names, document it. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1/asn1_gen.c')
-rw-r--r--crypto/asn1/asn1_gen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c
index fc69e31987..59a99edf2f 100644
--- a/crypto/asn1/asn1_gen.c
+++ b/crypto/asn1/asn1_gen.c
@@ -743,7 +743,7 @@ static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype)
}
if (format == ASN1_GEN_FORMAT_HEX) {
- if ((rdata = string_to_hex((char *)str, &rdlen)) == NULL) {
+ if ((rdata = OPENSSL_hexstr2buf((char *)str, &rdlen)) == NULL) {
ASN1err(ASN1_F_ASN1_STR2TYPE, ASN1_R_ILLEGAL_HEX);
goto bad_str;
}
ight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * WARNING: do not edit!
 * Generated by statistics/bn_rand_range.py in the OpenSSL tool repository.
 *
 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the Apache License 2.0 (the "License").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.openssl.org/source/license.html
 */

static const struct {
    unsigned int range;
    unsigned int iterations;
    double critical;
} rand_range_cases[] = {
    {     2,     200,     3.841459 },
    {     3,     300,     5.991465 },
    {     4,     400,     7.814728 },
    {     5,     500,     9.487729 },
    {     6,     600,    11.070498 },
    {     7,     700,    12.591587 },
    {     8,     800,    14.067140 },
    {     9,     900,    15.507313 },
    {    10,    1000,    16.918978 },
    {    11,    1100,    18.307038 },
    {    12,    1200,    19.675138 },
    {    13,    1300,    21.026070 },
    {    14,    1400,    22.362032 },
    {    15,    1500,    23.684791 },
    {    16,    1600,    24.995790 },
    {    17,    1700,    26.296228 },
    {    18,    1800,    27.587112 },
    {    19,    1900,    28.869299 },
    {    20,    2000,    30.143527 },
    {    30,    3000,    42.556968 },
    {    40,    4000,    54.572228 },
    {    50,    5000,    66.338649 },
    {    60,    6000,    77.930524 },
    {    70,    7000,    89.391208 },
    {    80,    8000,   100.748619 },
    {    90,    9000,   112.021986 },
    {   100,   10000,   123.225221 },
    {  1000,   10000,  1073.642651 },
    {  2000,   20000,  2104.128222 },
    {  3000,   30000,  3127.515432 },
    {  4000,   40000,  4147.230012 },
    {  5000,   50000,  5164.598069 },
    {  6000,   60000,  6180.299514 },
    {  7000,   70000,  7194.738181 },
    {  8000,   80000,  8208.177159 },
    {  9000,   90000,  9220.799176 },
    { 10000,  100000, 10232.737266 },
};

static const int binomial_critical = 29;