Mac OS X Keychain management client
PATCH v4 1/1 Mac OS X Keychain management client
This patch adds support for using certificates stored in the Mac OSX Keychain to authenticate with the OpenVPN server. This works with certificates stored on the computer as well as certificates on hardware tokens that support Apple's tokend interface. The patch is based on the Windows Crypto API certificate functionality that currently exists in OpenVPN.
This patch version implements management client which handles RSA-SIGN command for RSA offloading. Also it handles new 'NEED-CERTIFICATE' request to pass a certificate from the keychain to OpenVPN.
OpenVPN itself gets new 'NEED-CERTIFICATE" command which is called when --management-external-cert is used. It is implemented as a multiline command very similar to an existing 'RSA-SIGN' command.
The patch is against commit 3341a98c2852d1d0c1eafdc70a3bdb218ec29049.
v4:
- added '--management-external-cert' argument
- keychain-mcd now parses NEED-CERTIFICATE argument if 'auto' is passed as cmdline's identity template
- fixed typo in help output option name
- added '--management-external-cert' info in openvpn(8) manpage
- added 'certificate' command documentation into doc/management-notes.txt
v3:
- used new 'NEED-CERTIFICATE' command for certificate data request instead of 'NEED-OK'
- improved option checking
- improved invalid certificate selection string handling
- added man page for keychain-mcd
- handle INFO, FATAL commands from openvpn and show them to user
* ACK from Arne Schwabe for OpenVPN part
* ACK from James based on Arne's testing
v2 (http://sourceforge.net/p/openvpn/mailman/message/33225603/):
- used management interface to communicate with OpenVPN process
v1 (http://sourceforge.net/p/openvpn/mailman/message/33125844/):
- used RSA_METHOD to extend openvpn itself
--
.gitignore +0 -1
@@ -19,7 +19,6 @@ Debug Win32-Output .deps .libs -Makefile Makefile.in aclocal.m4 autodefs.h
contrib/keychain-mcd/Makefile new file +13 -0
@@ -0,0 +1,13 @@ +CFILES = cert_data.c common_osx.c crypto_osx.c main.c +OFILES = $(CFILES:.c=.o) ../../src/openvpn/base64.o +prog = keychain-mcd + +CC = gcc +CFLAGS = -Wall +LDFLAGS = -framework CoreFoundation -framework Security -framework CoreServices + +$(prog): $(OFILES) + $(CC) $(LDFLAGS) $(OFILES) -o $(prog) + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@
contrib/keychain-mcd/cert_data.c new file +733 -0
733 lines not on this page · raw message
contrib/keychain-mcd/cert_data.h new file +46 -0
46 lines not on this page · raw message
contrib/keychain-mcd/common_osx.c new file +94 -0
94 lines not on this page · raw message
contrib/keychain-mcd/common_osx.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* OpenVPN -- An application to securely tunnel IP networks +* over a single UDP port, with support for SSL/TLS-based +* session authentication and key exchange, +* packet encryption, packet authentication, and +* packet compression. +* +* Copyright (C) 2010 Brian Raderman <[email protected]...> +* Copyright (C) 2013-2015 Vasily Kulikov <[email protected]...> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program (see the file COPYING included with this +* distribution); if not, write to the Free Software Foundation, Inc., +* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef __common_osx_h__ +#define __common_osx_h__ + +#include <CoreFoundation/CoreFoundation.h> + +void printCFString (CFStringRef str); +char *cfstringToCstr (CFStringRef str); +CFStringRef createHexString (unsigned char *pData,int length); +void printHex (unsigned char *pData,int length); + +#endif //__Common_osx_h__
contrib/keychain-mcd/crypto_osx.c new file +75 -0
75 lines not on this page · raw message
contrib/keychain-mcd/crypto_osx.h new file +44 -0
44 lines not on this page · raw message
contrib/keychain-mcd/keychain-mcd.8 new file +162 -0
162 lines not on this page · raw message
contrib/keychain-mcd/main.c new file +255 -0
255 lines not on this page · raw message
doc/management-notes.txt +22 -0
@@ -777,6 +777,28 @@ correct signature. This capability is intended to allow the use of arbitrary cryptographic service providers with OpenVPN via the management interface. +COMMAND -- certificate (OpenVPN 2.3 or higher) +---------------------------------------------- +Provides support for external storage of the certificate. Requires the +--management-external-cert option. This option can be used instead of "cert" +in client mode. On SSL protocol initialization a notification will be sent +to the management interface with a hint as follows: + +>NEED-CERTIFICATE:macosx-keychain:subject:o=OpenVPN-TEST + +The management interface client should use the hint to obtain the specific +SSL certificate and then return base64 encoded certificate as follows: + +certificate +[BASE64_CERT_LINE] +. +. +. +END + +This capability is intended to allow the use of certificates +stored outside of the filesystem (e.g. in Mac OS X Keychain) +with OpenVPN via the management interface. OUTPUT FORMAT -------------
doc/openvpn.8 +9 -0
@@ -2591,6 +2591,15 @@ Allows usage for external private key file instead of option (client-only). .\"********************************************************* .TP +.B \-\-management-external-cert certificate-hint +Allows usage for external certificate instead of +.B \-\-cert +option (client-only). +.B certificate-hint +is an arbitrary string which is passed to a management +interface client as an argument of NEED-CERTIFICATE notification. +.\"********************************************************* +.TP .B \-\-management-forget-disconnect Make OpenVPN forget passwords when management session disconnects.
src/openvpn/buffer.c +11 -2
@@ -1066,8 +1066,10 @@ buffer_list_peek (struct buffer_list *ol) }void -buffer_list_aggregate (struct buffer_list *bl,const size_t max) +buffer_list_aggregate_separator (struct buffer_list *bl,const size_t max,const char *sep) { +int sep_len =strlen (sep); +if (bl->head) {struct buffer_entry *more = bl->head;
@@ -1075,7 +1077,7 @@ buffer_list_aggregate (struct buffer_list *bl, const size_t max)int count =0 ;for (count =0 ; more && size <= max; ++count) { - size +=BLEN (&more->buf); + size +=BLEN (&more->buf) + sep_len; more = more->next; }
@@ -1092,6 +1094,7 @@ buffer_list_aggregate (struct buffer_list *bl, const size_t max) {struct buffer_entry *next = e->next;buf_copy (&f->buf, &e->buf); +buf_write (&f->buf, sep, sep_len);free_buf (&e->buf);free (e); e = next;
@@ -1105,6 +1108,12 @@ buffer_list_aggregate (struct buffer_list *bl, const size_t max) }void +buffer_list_aggregate (struct buffer_list *bl,const size_t max) +{ +buffer_list_aggregate_separator (bl, max,"" ); +} + +void buffer_list_pop (struct buffer_list *ol) {if (ol && ol->head)
src/openvpn/buffer.h +1 -0
@@ -931,6 +931,7 @@ void buffer_list_advance (struct buffer_list *ol, int n);void buffer_list_pop (struct buffer_list *ol);void buffer_list_aggregate (struct buffer_list *bl,const size_t max); +void buffer_list_aggregate_separator (struct buffer_list *bl,const size_t max,const char *sep);struct buffer_list *buffer_list_file (const char *fn,int max_line_len);#endif /* BUFFER_H */
src/openvpn/manage.c +125 -28
214 lines not on this page · raw message
src/openvpn/manage.h +5 -0
@@ -268,6 +268,7 @@ struct man_connection {# define IEC_CLIENT_AUTH 1# define IEC_CLIENT_PF 2# define IEC_RSA_SIGN 3 +# define IEC_CERTIFICATE 4int in_extra_cmd;struct buffer_list *in_extra;#ifdef MANAGEMENT_DEF_AUTH
@@ -281,6 +282,8 @@ struct man_connection {# define EKS_READY 3int ext_key_state;struct buffer_list *ext_key_input; +int ext_cert_state; +struct buffer_list *ext_cert_input;#endif #endif struct event_set *es;
@@ -338,6 +341,7 @@ struct management *management_init (void);#define MF_UP_DOWN (1<<10)#define MF_QUERY_REMOTE (1<<11)#define MF_QUERY_PROXY (1<<12) +#define MF_EXTERNAL_CERT (1<<13) bool management_open (struct management *man, const char *addr,
@@ -420,6 +424,7 @@ void management_learn_addr (struct management *management,#ifdef MANAGMENT_EXTERNAL_KEY char *management_query_rsa_sig (struct management *man,const char *b64_data); +char *management_query_cert (struct management *man,const char *cert_name);#endif
src/openvpn/options.c +21 -1
@@ -1591,6 +1591,11 @@ show_settings (const struct options *o)SHOW_STR (ca_file);SHOW_STR (ca_path);SHOW_STR (dh_file); +#ifdef MANAGMENT_EXTERNAL_KEY +if ((o->management_flags &MF_EXTERNAL_CERT )) +SHOW_PARM ("cert_file" ,"EXTERNAL_CERT" ,"%s" ); + else +#endif SHOW_STR (cert_file);#ifdef MANAGMENT_EXTERNAL_KEY
@@ -2172,6 +2177,8 @@ options_postprocess_verify_ce (const struct options *options, const struct conne#ifdef MANAGMENT_EXTERNAL_KEY if (options->management_flags &MF_EXTERNAL_KEY )msg (M_USAGE ,"Parameter --management-external-key cannot be used when --pkcs11-provider is also specified." ); +if (options->management_flags &MF_EXTERNAL_CERT ) +msg (M_USAGE ,"Parameter --management-external-cert cannot be used when --pkcs11-provider is also specified." );#endif if (options->pkcs12_file)msg (M_USAGE ,"Parameter --pkcs12 cannot be used when --pkcs11-provider is also specified." );
@@ -2203,6 +2210,8 @@ options_postprocess_verify_ce (const struct options *options, const struct conne#ifdef MANAGMENT_EXTERNAL_KEY if (options->management_flags &MF_EXTERNAL_KEY )msg (M_USAGE ,"Parameter --management-external-key cannot be used when --cryptoapicert is also specified." ); +if (options->management_flags &MF_EXTERNAL_CERT ) +msg (M_USAGE ,"Parameter --management-external-cert cannot be used when --cryptoapicert is also specified." );#endif }else
@@ -2220,7 +2229,9 @@ options_postprocess_verify_ce (const struct options *options, const struct connemsg (M_USAGE ,"Parameter --key cannot be used when --pkcs12 is also specified." );#ifdef MANAGMENT_EXTERNAL_KEY if (options->management_flags &MF_EXTERNAL_KEY ) -msg (M_USAGE ,"Parameter --external-management-key cannot be used when --pkcs12 is also specified." ); +msg (M_USAGE ,"Parameter --management-external-key cannot be used when --pkcs12 is also specified." ); +if (options->management_flags &MF_EXTERNAL_CERT ) +msg (M_USAGE ,"Parameter --management-external-cert cannot be used when --pkcs12 is also specified." );#endif #endif }
@@ -2262,6 +2273,9 @@ options_postprocess_verify_ce (const struct options *options, const struct conne }else { +#ifdef MANAGMENT_EXTERNAL_KEY + if (!(options->management_flags & MF_EXTERNAL_CERT)) +#endif notnull (options->cert_file,"certificate file (--cert) or PKCS#12 file (--pkcs12)" );#ifdef MANAGMENT_EXTERNAL_KEY if (!(options->management_flags &MF_EXTERNAL_KEY ))
@@ -4249,6 +4263,12 @@ add_option (struct options *options,VERIFY_PERMISSION (OPT_P_GENERAL ); options->management_flags |= MF_EXTERNAL_KEY; } +else if (streq (p[0 ],"management-external-cert" ) && p[1 ]) + { +VERIFY_PERMISSION (OPT_P_GENERAL ); + options->management_flags |=MF_EXTERNAL_CERT ; + options->management_certificate = p[1 ]; + }#endif #ifdef MANAGEMENT_DEF_AUTH else if (streq (p[0], "management-client-auth"))
src/openvpn/options.h +1 -0
@@ -372,6 +372,7 @@ struct options/* Mask of MF_ values of manage.h */ unsigned int management_flags; +const char *management_certificate;#endif #ifdef ENABLE_PLUGIN
src/openvpn/ssl.c +13 -4
@@ -516,10 +516,19 @@ init_ssl (const struct options *options, struct tls_root_ctx *new_ctx) }#endif #ifdef MANAGMENT_EXTERNAL_KEY - else if ((options->management_flags & MF_EXTERNAL_KEY) && options->cert_file) - { -tls_ctx_use_external_private_key (new_ctx, options->cert_file, - options->cert_file_inline); + else if ((options->management_flags & MF_EXTERNAL_KEY) && + (options->cert_file || options->management_flags & MF_EXTERNAL_CERT)) + { +if (options->cert_file) { +tls_ctx_use_external_private_key (new_ctx, options->cert_file, + options->cert_file_inline); + }else { +char *external_certificate =management_query_cert (management, + options->management_certificate); +tls_ctx_use_external_private_key (new_ctx,INLINE_FILE_TAG , + external_certificate); +free (external_certificate); + } }#endif else
contrib/keychain-mcd/keychain-mcd.8 +13 -1
@@ -48,7 +48,9 @@ .BR identity-template A select string which is used to choose a keychain identity from -Mac OS X Keychain. +Mac OS X Keychain or +.I auto +if the identity template is passed from openvpn. \fBSubject\fR, \fBIssuer\fR, \fBSerial\fR, \fBSHA1\fR, \fBMD5\fR selectors can be used.
@@ -104,6 +106,16 @@ "Serial: 3E 9B 6F 02 00 00 00 01 1F 20" +If +.BR identity-template +equals to +.I auto +then the actual identity template is +obtained from argument of NEED-CERTIFICATE notification of openvpn. +In this case the argument of NEED-CERTIFICATE must begin with 'macosx-keychain:' prefix +and the rest of it must contain the actual identity template in the format described above. + + .TP .BR management-server-ip OpenVPN management IP to connect to.
contrib/keychain-mcd/main.c +14 -3
@@ -197,8 +197,17 @@if (is_prefix (buffer,">RSA_SIGN:" ))handle_rsasign (man, identity, buffer); -if (is_prefix (buffer,">NEED-CERTIFICATE" )) +if (is_prefix (buffer,">NEED-CERTIFICATE" )) { +if (!identity) { +const char prefix[] =">NEED-CERTIFICATE:macosx-keychain:" ; +if (!is_prefix (buffer, prefix)) +errx (1 ,"No identity template is passed via command line and " \ +"NEED-CERTIFICATE management interface command " \ +"misses 'macosx-keychain' prefix." ); + identity =template_to_identity (buffer+strlen (prefix)); + }handle_needcertificate (man, identity); + }if (is_prefix (buffer,">FATAL" ))fprintf (stderr,"Fatal message from OpenVPN: %s\n" , buffer+7 );if (is_prefix (buffer,">INFO" ))
@@ -225,7 +234,7 @@if (argc <4 )err (1 ,"usage: %s <identity_template> <management_ip> <management_port> [<pw-file>]" , argv[0 ]); -char *cert_prop = argv[1 ]; +char *identity_template = argv[1 ];char *s_ip = argv[2 ];char *s_port = argv[3 ];char *password =NULL ;
@@ -236,7 +245,9 @@ password =read_password (s_pw_file); } -SecIdentityRef identity =template_to_identity (cert_prop); +SecIdentityRef identity =NULL ; +if (strcmp (identity_template,"auto" )) + identity =template_to_identity (identity_template); man_fd =connect_to_management_server (s_ip, s_port);fprintf (stderr,"Successfully connected to openvpn\n" );
src/openvpn/manage.c +11 -3
@@ -3251,11 +3251,19 @@ } -char *management_query_cert (struct management *man) +char *management_query_cert (struct management *man,const char *cert_name) { -return management_query_multiline_flatten_newline (management, -NULL ,"NEED-CERTIFICATE" ,"certificate" , +const char prompt_1[] ="NEED-CERTIFICATE:" ; +struct buffer buf_prompt =alloc_buf (strlen (cert_name) +20 ); +buf_write (&buf_prompt, prompt_1,strlen (prompt_1)); +buf_write (&buf_prompt, cert_name,strlen (cert_name)+1 );// +1 for \0 + +char *result; + result =management_query_multiline_flatten_newline (management, +NULL , (char *)buf_bptr (&buf_prompt),"certificate" , &man->connection.ext_cert_state, &man->connection.ext_cert_input); +free_buf (&buf_prompt); +return result; }#endif
src/openvpn/manage.h +1 -1
@@ -424,7 +424,7 @@#ifdef MANAGMENT_EXTERNAL_KEY char *management_query_rsa_sig (struct management *man,const char *b64_data); -char *management_query_cert (struct management *man); +char *management_query_cert (struct management *man,const char *cert_name);#endif
src/openvpn/options.c +4 -3
@@ -2229,9 +2229,9 @@msg (M_USAGE ,"Parameter --key cannot be used when --pkcs12 is also specified." );#ifdef MANAGMENT_EXTERNAL_KEY if (options->management_flags &MF_EXTERNAL_KEY ) -msg (M_USAGE ,"Parameter --external-management-key cannot be used when --pkcs12 is also specified." ); +msg (M_USAGE ,"Parameter --management-external-key cannot be used when --pkcs12 is also specified." );if (options->management_flags &MF_EXTERNAL_CERT ) -msg (M_USAGE ,"Parameter --external-management-cert cannot be used when --pkcs12 is also specified." ); +msg (M_USAGE ,"Parameter --management-external-cert cannot be used when --pkcs12 is also specified." );#endif #endif }
@@ -4263,10 +4263,11 @@VERIFY_PERMISSION (OPT_P_GENERAL ); options->management_flags |= MF_EXTERNAL_KEY; } -else if (streq (p[0 ],"management-external-cert" )) +else if (streq (p[0 ],"management-external-cert" ) && p[1 ]) {VERIFY_PERMISSION (OPT_P_GENERAL ); options->management_flags |=MF_EXTERNAL_CERT ; + options->management_certificate = p[1 ]; }#endif #ifdef MANAGEMENT_DEF_AUTH
src/openvpn/ssl.c +2 -1
@@ -523,7 +523,8 @@tls_ctx_use_external_private_key (new_ctx, options->cert_file, options->cert_file_inline); }else { -char *external_certificate =management_query_cert (management); +char *external_certificate =management_query_cert (management, + options->management_certificate);tls_ctx_use_external_private_key (new_ctx,INLINE_FILE_TAG , external_certificate);free (external_certificate);
only in patch2:
unchanged:
doc/management-notes.txt +22 -0
@@ -777,6 +777,28 @@ correct signature. This capability is intended to allow the use of arbitrary cryptographic service providers with OpenVPN via the management interface. +COMMAND -- certificate (OpenVPN 2.3 or higher) +---------------------------------------------- +Provides support for external storage of the certificate. Requires the +--management-external-cert option. This option can be used instead of "cert" +in client mode. On SSL protocol initialization a notification will be sent +to the management interface with a hint as follows: + +>NEED-CERTIFICATE:macosx-keychain:subject:o=OpenVPN-TEST + +The management interface client should use the hint to obtain the specific +SSL certificate and then return base64 encoded certificate as follows: + +certificate +[BASE64_CERT_LINE] +. +. +. +END + +This capability is intended to allow the use of certificates +stored outside of the filesystem (e.g. in Mac OS X Keychain) +with OpenVPN via the management interface. OUTPUT FORMAT -------------
only in patch2:
unchanged:
doc/openvpn.8 +9 -0
@@ -2591,6 +2591,15 @@ Allows usage for external private key file instead of option (client-only). .\"********************************************************* .TP +.B \-\-management-external-cert certificate-hint +Allows usage for external certificate instead of +.B \-\-cert +option (client-only). +.B certificate-hint +is an arbitrary string which is passed to a management +interface client as an argument of NEED-CERTIFICATE notification. +.\"********************************************************* +.TP .B \-\-management-forget-disconnect Make OpenVPN forget passwords when management session disconnects.
only in patch2:
unchanged:
src/openvpn/options.h +1 -0
@@ -372,6 +372,7 @@ struct options/* Mask of MF_ values of manage.h */ unsigned int management_flags; +const char *management_certificate;#endif #ifdef ENABLE_PLUGIN
Hi,
Quoted 9 lines · Vasily Kulikov
The patch is against commit
3341a98c2852d1d0c1eafdc70a3bdb218ec29049.v4:
- added '--management-external-cert' argument
- keychain-mcd now parses NEED-CERTIFICATE argument if 'auto' is passed as cmdline's identity template
- fixed typo in help output option name
- added '--management-external-cert' info in openvpn(8) manpage
- added 'certificate' command documentation intodoc/management-notes.txt
Sorry to be nagging... something in your patch was garbled, it contained stuff like
-----------------------
only in patch2:
unchanged:
doc/management-notes.txt +0 -0
@@ -777,6 +777,28 @@ correct signature. This capability is intended to allow the use of arbitrary cryptographic service providers with OpenVPN via the management interface.
...
-----------------------
(the diff for doc/management-notes.txt is in there twice), and there is a patch for .gitignore in it as well.
Please generate the patch with "git format-patch", that should avoid spurious stuff.
Also, in the doc/management-notes.txt, it has
+COMMAND -- certificate (OpenVPN 2.3 or higher)
please make that "2.4", as this code change is too large to go into 2.3 (where we only do bug fixes and long-term stability stuff, but no new features generally)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Hi Gert,
Quoted 20 lines · Gert Doering
Quoted 9 lines · Vasily Kulikov
The patch is against commit
3341a98c2852d1d0c1eafdc70a3bdb218ec29049.v4:
- added '--management-external-cert' argument
- keychain-mcd now parses NEED-CERTIFICATE argument if 'auto' is passed as cmdline's identity template
- fixed typo in help output option name
- added '--management-external-cert' info in openvpn(8) manpage
- added 'certificate' command documentation intodoc/management-notes.txtSorry to be nagging... something in your patch was garbled, it contained stuff like
-----------------------
only in patch2:
unchanged:
doc/management-notes.txt correct signature.
Quoted 4 lines
doc/management-notes.txt +0
-1@@ -777,6 +777,28 @@ correct signature. This capability is intended to allow the use of arbitrary cryptographic service providers with OpenVPN via the management interface. -----------------------
This stuff is missing in the patch itself which is in the email text, and is contained in the attached interdiff file which contains changes between patch v3 and v4. AFAICS, the patch doesn't contain any garbage.
Quoted 2 lines
(the diff for
doc/management-notes.txtis in there twice), and there is a patch for .gitignore in it as well.
I've included .gitignore changes as my patch adds Makefile changes. It would be rather uncomfortable for openvpn developers to see Makefile and be not able to change it.
Quoted 11 lines
Please generate the patch with "git format-patch", that should avoid spurious stuff.
Also, in the
doc/management-notes.txt, it has+COMMAND -- certificate (OpenVPN 2.3 or higher)
please make that "2.4", as this code change is too large to go into 2.3 (where we only do bug fixes and long-term stability stuff, but no new features generally)
It makes sense.
Signature · 2 lines
Vasily Kulikov http://www.openwall.com - bringing security into open computing environments
Hi,
Quoted 17 lines · Vasily Kulikov
doc/management-notes.txt correct signature.
Quoted 13 lines
Sorry to be nagging... something in your patch was garbled, it contained stuff like
-----------------------
only in patch2:
unchanged:doc/management-notes.txt +0
-1@@ -777,6 +777,28 @@ correct signature. This capability is intended to allow the use of arbitrary cryptographic service providers with OpenVPN via the management interface. -----------------------This stuff is missing in the patch itself which is in the email text, and is contained in the attached interdiff file which contains changes between patch v3 and v4. AFAICS, the patch doesn't contain any garbage.
Looking more closely, I can now see what you did - the patch is in the mail text, and the actual attachment is not the patch but the diff between the patches (thus, doc/management-notes.txt appears twice). Did not expect that, and did not look closely enough.
Quoted 6 lines
Quoted 2 lines
(the diff for
doc/management-notes.txtis in there twice), and there is a patch for .gitignore in it as well.I've included .gitignore changes as my patch adds
Makefilechanges. It would be rather uncomfortable for openvpn developers to seeMakefileand be not able to change it.
Mmmh. Actually we don't usually do Makefile changes, as this is always generated by configure for us - so normally, it is good to have it in .gitignore. Of course your subdirectory has a Makefile in it for MacOS X only...
So - git experts to the rescue - how's this normally done?
(The textual change for doc/management-notes.txt does not warrant an extra patch, I'll change that on the fly)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
(the diff for
doc/management-notes.txtis in there twice), and there is a patch for .gitignore in it as well.I've included .gitignore changes as my patch adds
Makefilechanges. It would be rather uncomfortable for openvpn developers to seeMakefileand be not able to change it.
Quoted 8 lines
Mmmh. Actually we don't usually do
Makefilechanges, as this is always generated by configure for us - so normally, it is good to have it in .gitignore. Of course your subdirectory has aMakefilein it for MacOS X only...So - git experts to the rescue - how's this normally done?
just explicity git add the new Makefile under contrib/keychain-mcd. Git will then track the new makefile.
(If I am reading the patch right that the mac os x specific keychain-cmd makefile is not generated by configure)
Arne
Hi,
Quoted 9 lines · Gert Doering
Mmmh. Actually we don't usually do
Makefilechanges, as this is always generated by configure for us - so normally, it is good to have it in .gitignore. Of course your subdirectory has aMakefilein it for MacOS X only...So - git experts to the rescue - how's this normally done?
(The textual change for
doc/management-notes.txtdoes not warrant an extra patch, I'll change that on the fly)
Is the patch already merged? Or should I make any changes, e.g. remove .gitignore changes?
Thanks,
Signature · 2 lines
Vasily Kulikov http://www.openwall.com - bringing security into open computing environments
Hi,
Quoted 6 lines · Vasily Kulikov
Quoted 5 lines · Gert Doering
Mmmh. Actually we don't usually do
Makefilechanges, as this is always generated by configure for us - so normally, it is good to have it in .gitignore. Of course your subdirectory has aMakefilein it for MacOS X only...
Quoted 7 lines
Quoted 4 lines
So - git experts to the rescue - how's this normally done?
(The textual change for
doc/management-notes.txtdoes not warrant an extra patch, I'll change that on the fly)Is the patch already merged? Or should I make any changes, e.g. remove .gitignore changes?
Any update?
Signature · 2 lines
Vasily Kulikov http://www.openwall.com - bringing security into open computing environments
Quoted 10 lines
Hi,
Quoted 6 lines · Vasily Kulikov
Quoted 5 lines · Gert Doering
Mmmh. Actually we don't usually do
Makefilechanges, as this is always generated by configure for us - so normally, it is good to have it in .gitignore. Of course your subdirectory has aMakefilein it for MacOS X only...
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
So - git experts to the rescue - how's this normally done?
(The textual change for
doc/management-notes.txtdoes not warrant an extra patch, I'll change that on the fly)Is the patch already merged? Or should I make any changes, e.g. remove .gitignore changes?
Any update?
I suggest we figure this out in today's meeting.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · Gert Doering
Hi,
On Fri, Feb 27, 2015 at 10:27:46PM +0300, Vasily Kulikov wrote:
[...snip...]
Quoted 10 lines
Quoted 3 lines
I've included .gitignore changes as my patch adds
Makefilechanges. It would be rather uncomfortable for openvpn developers to seeMakefileand be not able to change it.Mmmh. Actually we don't usually do
Makefilechanges, as this is always generated by configure for us - so normally, it is good to have it in .gitignore. Of course your subdirectory has aMakefilein it for MacOS X only...So - git experts to the rescue - how's this normally done?
I agree with Arne, do 'git add -f contrib/keychain-mcd/Makefile' instead. And git will keep track of this file, regardless of .gitignore.
I don't recall now if -f was always required or just recent versions needs it. I've double checked the .gitignore behaviour on git 1.8.3.1, which required the -f argument. And everything works as expected in this version.
- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iEYEARECAAYFAlUZIIEACgkQDC186MBRfrrZOQCgoTh3PmYViPxP4NAl2aqQMDBJ tqoAn3vtnvwhN6qX1/bPhDjxjKTPdbgR
=qJIy
-----END PGP SIGNATURE-----
Hi,
Quoted 9 lines · Samuli Seppänen
Quoted 9 lines · Vasily Kulikov
Quoted 8 lines · Gert Doering
Quoted 7 lines
Mmmh. Actually we don't usually do
Makefilechanges, as this is always generated by configure for us - so normally, it is good to have it in .gitignore. Of course your subdirectory has aMakefilein it for MacOS X only...So - git experts to the rescue - how's this normally done?
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
(The textual change for
doc/management-notes.txtdoes not warrant an extra patch, I'll change that on the fly)Is the patch already merged? Or should I make any changes, e.g. remove .gitignore changes?
Any update?
I suggest we figure this out in today's meeting.
Arne, AFAIU you are the one to ACK/NACK the v3..v4 diff. Have you looked at the patch after v3?
Thank you,
Signature · 2 lines
Vasily Kulikov http://www.openwall.com - bringing security into open computing environments
Am 25.02.15 um 17:07 schrieb Vasily Kulikov:
Quoted 17 lines
This patch adds support for using certificates stored in the Mac OSX Keychain to authenticate with the OpenVPN server. This works with certificates stored on the computer as well as certificates on hardware tokens that support Apple's tokend interface. The patch is based on the Windows Crypto API certificate functionality that currently exists in OpenVPN.
This patch version implements management client which handles RSA-SIGN command for RSA offloading. Also it handles new 'NEED-CERTIFICATE' request to pass a certificate from the keychain to OpenVPN.
OpenVPN itself gets new 'NEED-CERTIFICATE" command which is called when --management-external-cert is used. It is implemented as a multiline command very similar to an existing 'RSA-SIGN' command.
The patch is against commit
3341a98c2852d1d0c1eafdc70a3bdb218ec29049.
Quoted 7 lines
v4:
- added '--management-external-cert' argument
- keychain-mcd now parses NEED-CERTIFICATE argument if 'auto' is passed as cmdline's identity template
- fixed typo in help output option name
- added '--management-external-cert' info in openvpn(8) manpage
- added 'certificate' command documentation intodoc/management-notes.txt
Sorry taking soooo long. ACK to v4. (in the same way as v3, I reviewed in the openvpn changes in detail and only briefly looked at the keychain-mcd changes)
Are
Your v4 patch has been applied to the master branch, thanks.
commit 39e3d336d4eeab847a3395ddeb430e0a9ca387b9
Author: Vasily Kulikov Date: Wed Feb 25 19:07:18 2015 +0300
Mac OS X Keychain management client
Signed-off-by: Vasily Kulikov <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Message-Id: <[email protected]...>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9486
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering