<html>
  <head>
    <meta content="text/html; charset=iso-8859-2"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi, <br>
    I do the following:<br>
    Following the link from Balabit i have done the server site without
    errors. Then i do this on the client site<br>
    <meta http-equiv="content-type" content="text/html;
      charset=iso-8859-2">
    <ol class="procedure" style="font-size: 16px; color: rgb(0, 0, 0);
      font-family: 'Droid Sans', Verdana, Helvetica, sans-serif;
      font-style: normal; font-variant: normal; font-weight: normal;
      letter-spacing: normal; line-height: 24px; orphans: auto;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 1; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
      255);" type="1">
      <li class="step" style="font-size: 1em;">
        <p style="list-style: square;"><span class="command"
            style="font-family: Courier, fixed; font-weight: normal;"><strong
              style="font-weight: normal;">mkdir certs crl newcerts
              private</strong></span></p>
        <p style="list-style: square;"><span class="command"
            style="font-family: Courier, fixed; font-weight: normal;"><strong
              style="font-weight: normal;">echo "01" &gt; serial</strong></span></p>
        <p style="list-style: square;"><span class="command"
            style="font-family: Courier, fixed; font-weight: normal;"><strong
              style="font-weight: normal;">cp /dev/null index.txt</strong></span></p>
      </li>
    </ol>
    <p>Than i copy the<strong> "cacert.pem"  </strong>to the client
      machine and try the next step <strong>"</strong>Creating a client
      certificate" using the following command <br>
      <meta http-equiv="content-type" content="text/html;
        charset=iso-8859-2">
      openssl req -nodes -new -x509 -keyout clientkey.pem -out
      clientreq.pem -days 365 -config openssl.cnf<br>
      <meta http-equiv="content-type" content="text/html;
        charset=iso-8859-2">
      openssl x509 -x509toreq -in clientreq.pem -signkey clientkey.pem
      -out tmp.pem<br>
      <strong style="font-weight: normal; color: rgb(0, 0, 0);
        font-family: Courier, fixed; font-size: 16px; font-style:
        normal; font-variant: normal; letter-spacing: normal;
        line-height: 24px; orphans: auto; text-align: left; text-indent:
        0px; text-transform: none; white-space: normal; widows: 1;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255);"></strong></p>
    And on the last line i have the errors<br>
    openssl ca -config openssl.cnf -policy policy_anything -out
    clientcert.pem -infiles tmp.pem<br>
    <br>
    Using configuration from openssl.cnf<br>
    Enter pass phrase for ./private/cakey.pem:<br>
    Error opening CA certificate ./cacert.pem<br>
    140030533961632:error:02001002:system library:fopen:No such file or
    directory:bss_file.c:398:fopen('./cacert.pem','r')<br>
    140030533961632:error:20074002:BIO routines:FILE_CTRL:system
    lib:bss_file.c:400:<br>
    unable to load certificate<br>
    <br>
    So i try copy the serverkey.pem and servercert.pem but similar
    errors <br>
    <br class="Apple-interchange-newline">
    Using configuration from openssl.cnf<br>
    Enter pass phrase for ./private/cakey.pem:<br>
    Error opening CA certificate ./cacert.pem<br>
    140578607339424:error:02001002:system library:fopen:No such file or
    directory:bss_file.c:398:fopen('./cacert.pem','r')<br>
    140578607339424:error:20074002:BIO routines:FILE_CTRL:system
    lib:bss_file.c:400:<br>
    unable to load certificate<br>
    <br>
    Using configuration from openssl.cnf<br>
    Enter pass phrase for ./private/cakey.pem:<br>
    unable to load CA private key<br>
    140231163467680:error:06065064:digital envelope
    routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:604:<br>
    140231163467680:error:23077074:PKCS12
    routines:PKCS12_pbe_crypt:pkcs12 cipherfinal error:p12_decr.c:104:<br>
    140231163467680:error:2306A075:PKCS12
    routines:PKCS12_item_decrypt_d2i:pkcs12 pbe crypt
    error:p12_decr.c:130:<br>
    140231163467680:error:0907B00D:PEM
    routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:pem_pkey.c:132:<br>
    <br>
    So i'm not sure what im missing <br>
    <br>
    Thanks !<br>
    <br>
    <div class="moz-cite-prefix">On 01/15/2016 05:15 PM, PÁSZTOR György
      wrote:<br>
    </div>
    <blockquote
      cite="mid:20160115161551.GA13726@linux.gyakg.u-szeged.hu"
      type="cite">
      <pre wrap="">Hi,

"Ivan Adji - Krstev" <a class="moz-txt-link-rfc2396E" href="mailto:akivanradix@gmail.com">&lt;akivanradix@gmail.com&gt;</a> írta 2016-01-15 15:06-kor:
</pre>
      <blockquote type="cite">
        <pre wrap="">Can someone give me the right way to do this as i following this
tuttorial and still have errors:
<a class="moz-txt-link-freetext" href="https://www.balabit.com/sites/default/files/documents/syslog-ng-ose-latest-guides/en/syslog-ng-tutorial-mutual-auth-tls/html/create-ca.html">https://www.balabit.com/sites/default/files/documents/syslog-ng-ose-latest-guides/en/syslog-ng-tutorial-mutual-auth-tls/html/create-ca.html</a>
</pre>
      </blockquote>
      <pre wrap="">
This guide seems pretty good.
What errors do you have?
This guide assumes, you have a "pki" machine. One machine, where you
generates all the certificates, keys, and do any pki-related thing.
As it is usual.
Then it is consequent with the filenames, so when it shows the server
side's config, and you see a "cacert.pem", it comes from this pki
environment. The same cacert.pem should be applied to the client side.

Step #1:
Does your server start?
Step #2:
Does your client starts?

If it is only a test system, and the keys are not "real secret" yet,
and still have problems, I suggest to use the contrib/syslog-debun
to collect the config and other environment related things from your
client and server side, and send those to me.
I do not know, if .tar.gz attachments are allowed on the mailing list.
But I would gladly check them.

If the server is able to start, then please run the debug bundle collector
with these parameters:
contrib/syslog-debun -d
It will stop the syslog-ng as a system service, and start in foregrund
debug mode, until you press enter. Then it will stop the debug mode
service, and start again the "system service".

Until the server runs in debug mode, please try the same on the client
side.
The most important part of the whole debugging, that I would like to
see the syslog-ng's debug messages and see what happens from the
syslog-ng's point of view.

Cheers,
Gyu
______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>

</pre>
    </blockquote>
    <br>
  </body>
</html>