2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
12 #include <openssl/rsa.h>
13 #include <openssl/x509.h>
15 #include <openssl/err.h>
21 METHOD_CTX *top, *tmp1, *tmp2;
23 top = METH_new(x509_lookup()); /* get a top level context */
27 tmp1 = METH_new(x509_by_file());
30 METH_arg(tmp1, METH_TYPE_FILE, "cafile1");
31 METH_arg(tmp1, METH_TYPE_FILE, "cafile2");
32 METH_push(top, METH_X509_CA_BY_SUBJECT, tmp1);
34 tmp2 = METH_new(x509_by_dir());
35 METH_arg(tmp2, METH_TYPE_DIR, "/home/eay/.CAcerts");
36 METH_arg(tmp2, METH_TYPE_DIR, "/home/eay/SSLeay/certs");
37 METH_arg(tmp2, METH_TYPE_DIR, "/usr/local/ssl/certs");
38 METH_push(top, METH_X509_CA_BY_SUBJECT, tmp2);
40 /*- tmp=METH_new(x509_by_issuer_dir);
41 METH_arg(tmp,METH_TYPE_DIR,"/home/eay/.mycerts");
42 METH_push(top,METH_X509_BY_ISSUER,tmp);
44 tmp=METH_new(x509_by_issuer_primary);
45 METH_arg(tmp,METH_TYPE_FILE,"/home/eay/.mycerts/primary.pem");
46 METH_push(top,METH_X509_BY_ISSUER,tmp);
50 METH_control(tmp1, METH_CONTROL_DUMP, stdout);
51 METH_control(tmp2, METH_CONTROL_DUMP, stdout);
54 ERR_print_errors_fp(stderr);