Change STRING to OPENSSL_STRING etc as common words such
[openssl.git] / apps / cms.c
index f16e646..3adcd78 100644 (file)
@@ -71,9 +71,9 @@
 static int save_certs(char *signerfile, STACK_OF(X509) *signers);
 static int cms_cb(int ok, X509_STORE_CTX *ctx);
 static void receipt_request_print(BIO *out, CMS_ContentInfo *cms);
-static CMS_ReceiptRequest *make_receipt_request(STACK_OF(STRING) *rr_to,
+static CMS_ReceiptRequest *make_receipt_request(STACK_OF(OPENSSL_STRING) *rr_to,
                                                int rr_allorfirst,
-                                               STACK_OF(STRING) *rr_from);
+                                       STACK_OF(OPENSSL_STRING) *rr_from);
 
 #define SMIME_OP       0x10
 #define SMIME_IP       0x20
@@ -108,7 +108,7 @@ int MAIN(int argc, char **argv)
        const char *inmode = "r", *outmode = "w";
        char *infile = NULL, *outfile = NULL, *rctfile = NULL;
        char *signerfile = NULL, *recipfile = NULL;
-       STACK_OF(STRING) *sksigners = NULL, *skkeys = NULL;
+       STACK_OF(OPENSSL_STRING) *sksigners = NULL, *skkeys = NULL;
        char *certfile = NULL, *keyfile = NULL, *contfile=NULL;
        char *certsoutfile = NULL;
        const EVP_CIPHER *cipher = NULL;
@@ -122,7 +122,7 @@ int MAIN(int argc, char **argv)
        int flags = CMS_DETACHED, noout = 0, print = 0;
        int verify_retcode = 0;
        int rr_print = 0, rr_allorfirst = -1;
-       STACK_OF(STRING) *rr_to = NULL, *rr_from = NULL;
+       STACK_OF(OPENSSL_STRING) *rr_to = NULL, *rr_from = NULL;
        CMS_ReceiptRequest *rr = NULL;
        char *to = NULL, *from = NULL, *subject = NULL;
        char *CAfile = NULL, *CApath = NULL;
@@ -281,8 +281,8 @@ int MAIN(int argc, char **argv)
                                goto argerr;
                        args++;
                        if (!rr_from)
-                               rr_from = sk_STRING_new_null();
-                       sk_STRING_push(rr_from, *args);
+                               rr_from = sk_OPENSSL_STRING_new_null();
+                       sk_OPENSSL_STRING_push(rr_from, *args);
                        }
                else if (!strcmp(*args,"-receipt_request_to"))
                        {
@@ -290,8 +290,8 @@ int MAIN(int argc, char **argv)
                                goto argerr;
                        args++;
                        if (!rr_to)
-                               rr_to = sk_STRING_new_null();
-                       sk_STRING_push(rr_to, *args);
+                               rr_to = sk_OPENSSL_STRING_new_null();
+                       sk_OPENSSL_STRING_push(rr_to, *args);
                        }
                else if (!strcmp (*args, "-print"))
                                {
@@ -387,13 +387,13 @@ int MAIN(int argc, char **argv)
                        if (signerfile)
                                {
                                if (!sksigners)
-                                       sksigners = sk_STRING_new_null();
-                               sk_STRING_push(sksigners, signerfile);
+                                       sksigners = sk_OPENSSL_STRING_new_null();
+                               sk_OPENSSL_STRING_push(sksigners, signerfile);
                                if (!keyfile)
                                        keyfile = signerfile;
                                if (!skkeys)
-                                       skkeys = sk_STRING_new_null();
-                               sk_STRING_push(skkeys, keyfile);
+                                       skkeys = sk_OPENSSL_STRING_new_null();
+                               sk_OPENSSL_STRING_push(skkeys, keyfile);
                                keyfile = NULL;
                                }
                        signerfile = *++args;
@@ -435,12 +435,12 @@ int MAIN(int argc, char **argv)
                                        goto argerr;
                                        }
                                if (!sksigners)
-                                       sksigners = sk_STRING_new_null();
-                               sk_STRING_push(sksigners, signerfile);
+                                       sksigners = sk_OPENSSL_STRING_new_null();
+                               sk_OPENSSL_STRING_push(sksigners, signerfile);
                                signerfile = NULL;
                                if (!skkeys)
-                                       skkeys = sk_STRING_new_null();
-                               sk_STRING_push(skkeys, keyfile);
+                                       skkeys = sk_OPENSSL_STRING_new_null();
+                               sk_OPENSSL_STRING_push(skkeys, keyfile);
                                }
                        keyfile = *++args;
                        }
@@ -539,13 +539,13 @@ int MAIN(int argc, char **argv)
                if (signerfile)
                        {
                        if (!sksigners)
-                               sksigners = sk_STRING_new_null();
-                       sk_STRING_push(sksigners, signerfile);
+                               sksigners = sk_OPENSSL_STRING_new_null();
+                       sk_OPENSSL_STRING_push(sksigners, signerfile);
                        if (!skkeys)
-                               skkeys = sk_STRING_new_null();
+                               skkeys = sk_OPENSSL_STRING_new_null();
                        if (!keyfile)
                                keyfile = signerfile;
-                       sk_STRING_push(skkeys, keyfile);
+                       sk_OPENSSL_STRING_push(skkeys, keyfile);
                        }
                if (!sksigners)
                        {
@@ -980,11 +980,11 @@ int MAIN(int argc, char **argv)
                        }
                else
                        flags |= CMS_REUSE_DIGEST;
-               for (i = 0; i < sk_STRING_num(sksigners); i++)
+               for (i = 0; i < sk_OPENSSL_STRING_num(sksigners); i++)
                        {
                        CMS_SignerInfo *si;
-                       signerfile = sk_STRING_value(sksigners, i);
-                       keyfile = sk_STRING_value(skkeys, i);
+                       signerfile = sk_OPENSSL_STRING_value(sksigners, i);
+                       keyfile = sk_OPENSSL_STRING_value(skkeys, i);
                        signer = load_cert(bio_err, signerfile,FORMAT_PEM, NULL,
                                        e, "signer certificate");
                        if (!signer)
@@ -1160,9 +1160,9 @@ end:
        if (vpm)
                X509_VERIFY_PARAM_free(vpm);
        if (sksigners)
-               sk_STRING_free(sksigners);
+               sk_OPENSSL_STRING_free(sksigners);
        if (skkeys)
-               sk_STRING_free(skkeys);
+               sk_OPENSSL_STRING_free(skkeys);
        if (secret_key)
                OPENSSL_free(secret_key);
        if (secret_keyid)
@@ -1172,9 +1172,9 @@ end:
        if (rr)
                CMS_ReceiptRequest_free(rr);
        if (rr_to)
-               sk_STRING_free(rr_to);
+               sk_OPENSSL_STRING_free(rr_to);
        if (rr_from)
-               sk_STRING_free(rr_from);
+               sk_OPENSSL_STRING_free(rr_from);
        X509_STORE_free(store);
        X509_free(cert);
        X509_free(recip);
@@ -1296,7 +1296,7 @@ static void receipt_request_print(BIO *out, CMS_ContentInfo *cms)
                }
        }
 
-static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(STRING) *ns)
+static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(OPENSSL_STRING) *ns)
        {
        int i;
        STACK_OF(GENERAL_NAMES) *ret;
@@ -1305,9 +1305,9 @@ static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(STRING) *ns)
        ret = sk_GENERAL_NAMES_new_null();
        if (!ret)
                goto err;
-       for (i = 0; i < sk_STRING_num(ns); i++)
+       for (i = 0; i < sk_OPENSSL_STRING_num(ns); i++)
                {
-               char *str = sk_STRING_value(ns, i);
+               char *str = sk_OPENSSL_STRING_value(ns, i);
                gen = a2i_GENERAL_NAME(NULL, NULL, NULL, GEN_EMAIL, str, 0);
                if (!gen)
                        goto err;
@@ -1335,9 +1335,9 @@ static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(STRING) *ns)
        }
 
 
-static CMS_ReceiptRequest *make_receipt_request(STACK_OF(STRING) *rr_to,
+static CMS_ReceiptRequest *make_receipt_request(STACK_OF(OPENSSL_STRING) *rr_to,
                                                int rr_allorfirst,
-                                               STACK_OF(STRING) *rr_from)
+                                               STACK_OF(OPENSSL_STRING) *rr_from)
        {
        STACK_OF(GENERAL_NAMES) *rct_to, *rct_from;
        CMS_ReceiptRequest *rr;