1#include <stdio.h> 2#include <stdlib.h> 3#include <string.h> 4#include <ctype.h> 5#include <openssl/e_os2.h> 6#include <openssl/buffer.h> 7#include <openssl/crypto.h> 8 9int main(int argc, char *argv[]) 10{ 11 char *p, *q = 0, *program; 12 13 p = strrchr(argv[0], '/'); 14 if (!p) 15 p = strrchr(argv[0], '\\'); 16#ifdef OPENSSL_SYS_VMS 17 if (!p) 18 p = strrchr(argv[0], ']'); 19 if (p) 20 q = strrchr(p, '>'); 21 if (q) 22 p = q; 23 if (!p) 24 p = strrchr(argv[0], ':'); 25 q = 0; 26#endif 27 if (p) 28 p++; 29 if (!p) 30 p = argv[0]; 31 if (p) 32 q = strchr(p, '.'); 33 if (p && !q) 34 q = p + strlen(p); 35 36 if (!p) 37 program = BUF_strdup("(unknown)"); 38 else { 39 program = OPENSSL_malloc((q - p) + 1); 40 strncpy(program, p, q - p); 41 program[q - p] = '\0'; 42 } 43 44 for (p = program; *p; p++) 45 if (islower((unsigned char)(*p))) 46 *p = toupper((unsigned char)(*p)); 47 48 q = strstr(program, "TEST"); 49 if (q > p && q[-1] == '_') 50 q--; 51 *q = '\0'; 52 53 printf("No %s support\n", program); 54 55 OPENSSL_free(program); 56 return (0); 57} 58