diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-02-17 03:09:58 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-02-17 03:09:58 +0000 |
commit | d08d8da4326f4bd1a0392fff3089c72d1236b634 (patch) | |
tree | 35486aa2269333eef0e59b72283ba81f1c88d82c /crypto/x509v3/v3_utl.c | |
parent | 413c4f45ed0508d2242638696b7665f499d68265 (diff) |
Added code to GENERAL_NAME with support for more options and preliminary
support for assignment in config files.
Diffstat (limited to 'crypto/x509v3/v3_utl.c')
-rw-r--r-- | crypto/x509v3/v3_utl.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index 2c3a891254..45a3a56234 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -58,6 +58,7 @@ /* X509 v3 extension utilities */ #include <stdlib.h> +#include <string.h> #include <ctype.h> #include <pem.h> #include <conf.h> @@ -393,3 +394,20 @@ long *len; return NULL; } + +/* V2I name comparison function: returns zero if 'name' matches + * cmp or cmp.* + */ + +int name_cmp(name, cmp) +char *name; +char *cmp; +{ + int len, ret; + char c; + len = strlen(cmp); + if((ret = strncmp(name, cmp, len))) return ret; + c = name[len]; + if(!c || (c=='.')) return 0; + return 1; +} |