diff options
author | Ulf Möller <ulf@openssl.org> | 2001-09-01 05:59:27 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 2001-09-01 05:59:27 +0000 |
commit | 8716dbea40e80bc495624d37fe883a57103d45f0 (patch) | |
tree | be9c47fd7f41d6e7216867f64e5df3be39ca43a4 /crypto | |
parent | e9bc66c84fd096b965b840c0a05df25ca49401dc (diff) | |
download | openssl-8716dbea40e80bc495624d37fe883a57103d45f0.tar.gz |
undo, didn't work
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/evp_test.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/crypto/evp/evp_test.c b/crypto/evp/evp_test.c index 037fcefcc6..1fdc997619 100644 --- a/crypto/evp/evp_test.c +++ b/crypto/evp/evp_test.c @@ -85,39 +85,8 @@ static int convert(unsigned char *s) return s-d; } -static unsigned char *ustrsep(char **string ,const char *delim) - { - char isdelim[256]; - char *token = *string; - - if (**string == 0) - return NULL; - - memset(isdelim, 0, 256); - isdelim[0] = 1; - - while (*delim) - { - isdelim[(unsigned char)(*delim)] = 1; - delim++; - } - - while (!isdelim[(unsigned char)(**string)]) - { - while (!isdelim[(unsigned char)(**string)]) - { - (*string)++; - } - - if (**string) - { - **string = 0; - (*string)++; - } - - return token; - } - } +static unsigned char *ustrsep(char **p,const char *sep) + { return (unsigned char *)strsep((char **)p,sep); } static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, const unsigned char *iv,int in, @@ -328,7 +297,7 @@ int main(int argc,char **argv) if(line[0] == '#' || line[0] == '\n') continue; p=line; - cipher=(char*)ustrsep(&p,":"); + cipher=strsep(&p,":"); key=ustrsep(&p,":"); iv=ustrsep(&p,":"); plaintext=ustrsep(&p,":"); |