You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bn...@apache.org on 2005/01/20 21:01:29 UTC
svn commit: r125808 - /apr/apr-util/trunk/include/apr_ldap_option.h /apr/apr-util/trunk/ldap/apr_ldap_option.c
Author: bnicholes
Date: Thu Jan 20 12:01:27 2005
New Revision: 125808
URL: http://svn.apache.org/viewcvs?view=rev&rev=125808
Log:
Add another certificate format type for the Novell LDAP SDK
Modified:
apr/apr-util/trunk/include/apr_ldap_option.h
apr/apr-util/trunk/ldap/apr_ldap_option.c
Modified: apr/apr-util/trunk/include/apr_ldap_option.h
Url: http://svn.apache.org/viewcvs/apr/apr-util/trunk/include/apr_ldap_option.h?view=diff&rev=125808&p1=apr/apr-util/trunk/include/apr_ldap_option.h&r1=125807&p2=apr/apr-util/trunk/include/apr_ldap_option.h&r2=125808
==============================================================================
--- apr/apr-util/trunk/include/apr_ldap_option.h (original)
+++ apr/apr-util/trunk/include/apr_ldap_option.h Thu Jan 20 12:01:27 2005
@@ -127,6 +127,10 @@
#define APR_LDAP_KEY_TYPE_DER 11
/** PEM encoded private key */
#define APR_LDAP_KEY_TYPE_BASE64 12
+/** PKCS#12 encoded client certificate */
+#define APR_LDAP_CERT_TYPE_PFX 13
+/** PKCS#12 encoded private key */
+#define APR_LDAP_KEY_TYPE_PFX 14
/**
* Certificate structure.
Modified: apr/apr-util/trunk/ldap/apr_ldap_option.c
Url: http://svn.apache.org/viewcvs/apr/apr-util/trunk/ldap/apr_ldap_option.c?view=diff&rev=125808&p1=apr/apr-util/trunk/ldap/apr_ldap_option.c&r1=125807&p2=apr/apr-util/trunk/ldap/apr_ldap_option.c&r2=125808
==============================================================================
--- apr/apr-util/trunk/ldap/apr_ldap_option.c (original)
+++ apr/apr-util/trunk/ldap/apr_ldap_option.c Thu Jan 20 12:01:27 2005
@@ -434,6 +434,12 @@
(void*)ents[i].password);
result->msg = ldap_err2string(result->rc);
break;
+ case APR_LDAP_CERT_TYPE_PFX:
+ result->rc = ldapssl_set_client_cert((void *)ents[i].path,
+ LDAPSSL_FILETYPE_P12,
+ (void*)ents[i].password);
+ result->msg = ldap_err2string(result->rc);
+ break;
case APR_LDAP_KEY_TYPE_DER:
result->rc = ldapssl_set_client_private_key((void *)ents[i].path,
LDAPSSL_CERT_FILETYPE_DER,
@@ -443,6 +449,12 @@
case APR_LDAP_KEY_TYPE_BASE64:
result->rc = ldapssl_set_client_private_key((void *)ents[i].path,
LDAPSSL_CERT_FILETYPE_B64,
+ (void*)ents[i].password);
+ result->msg = ldap_err2string(result->rc);
+ break;
+ case APR_LDAP_KEY_TYPE_PFX:
+ result->rc = ldapssl_set_client_private_key((void *)ents[i].path,
+ LDAPSSL_FILETYPE_P12,
(void*)ents[i].password);
result->msg = ldap_err2string(result->rc);
break;