[Pkg-voip-commits] r10427 - in /belle-sip/trunk/debian: changelog patches/use-polarssl-1.3-api.patch
lechner-guest at alioth.debian.org
lechner-guest at alioth.debian.org
Sat Feb 8 23:18:58 UTC 2014
Author: lechner-guest
Date: Sat Feb 8 23:18:57 2014
New Revision: 10427
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10427
Log:
Use PolarSSL API v1.3 instead of v1.2 compatibility layer
Modified:
belle-sip/trunk/debian/changelog
belle-sip/trunk/debian/patches/use-polarssl-1.3-api.patch
Modified: belle-sip/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/belle-sip/trunk/debian/changelog?rev=10427&op=diff
==============================================================================
--- belle-sip/trunk/debian/changelog (original)
+++ belle-sip/trunk/debian/changelog Sat Feb 8 23:18:57 2014
@@ -1,6 +1,7 @@
-belle-sip (1.2.4-1) unstable; urgency=medium
+belle-sip (1.2.4-1) UNRELEASED; urgency=medium
* Team upload.
* Initial release (Closes: #737830)
+ * Use PolarSSL API v1.3 instead of v1.2 compatibility layer
- -- Felix Lechner <felix.lechner at gmail.com> Wed, 05 Feb 2014 22:58:35 -0800
+ -- Felix Lechner <felix.lechner at gmail.com> Sat, 08 Feb 2014 14:22:52 -0800
Modified: belle-sip/trunk/debian/patches/use-polarssl-1.3-api.patch
URL: http://svn.debian.org/wsvn/pkg-voip/belle-sip/trunk/debian/patches/use-polarssl-1.3-api.patch?rev=10427&op=diff
==============================================================================
--- belle-sip/trunk/debian/patches/use-polarssl-1.3-api.patch (original)
+++ belle-sip/trunk/debian/patches/use-polarssl-1.3-api.patch Sat Feb 8 23:18:57 2014
@@ -158,7 +158,7 @@
#endif
}
-@@ -461,10 +509,19 @@ belle_sip_signing_key_t* belle_sip_signi
+@@ -461,10 +509,23 @@ belle_sip_signing_key_t* belle_sip_signi
#ifdef HAVE_POLARSSL
belle_sip_signing_key_t* signing_key = belle_sip_object_new(belle_sip_signing_key_t);
int err;
@@ -166,8 +166,12 @@
if ((err=x509parse_key(&signing_key->key,(const unsigned char *)buff,size,(const unsigned char*)passwd,passwd?strlen(passwd):0)) <0) {
+#else
+ pk_init(&signing_key->key);
-+ /* for 1.3 or greater, also parses public keys other than RSA */
-+ if ((err=pk_parse_key(&signing_key->key,(const unsigned char *)buff,size,(const unsigned char*)passwd,passwd?strlen(passwd):0)) <0) {
++ /* for API v1.3 or greater also parses public keys other than RSA */
++ err=pk_parse_key(&signing_key->key,(const unsigned char *)buff,size,(const unsigned char*)passwd,passwd?strlen(passwd):0);
++ /* make sure cipher is RSA to be consistent with API v1.2 */
++ if(err==0 && !pk_can_do(&signing_key->key,POLARSSL_PK_RSA))
++ err=POLARSSL_ERR_PK_TYPE_MISMATCH;
++ if (err<0) {
+#endif
char tmp[128];
error_strerror(err,tmp,sizeof(tmp));
@@ -179,7 +183,7 @@
belle_sip_object_unref(signing_key);
return NULL;
}
-@@ -478,10 +535,19 @@ belle_sip_signing_key_t* belle_sip_signi
+@@ -478,10 +539,23 @@ belle_sip_signing_key_t* belle_sip_signi
#ifdef HAVE_POLARSSL
belle_sip_signing_key_t* signing_key = belle_sip_object_new(belle_sip_signing_key_t);
int err;
@@ -187,8 +191,12 @@
if ((err=x509parse_keyfile(&signing_key->key,(const unsigned char *)path, passwd)) <0) {
+#else
+ pk_init(&signing_key->key);
-+ /* for 1.3 or greater, also parses public keys other than RSA */
-+ if ((err=pk_parse_keyfile(&signing_key->key,(const unsigned char *)path, passwd)) <0) {
++ /* for API v1.3 or greater also parses public keys other than RSA */
++ err=pk_parse_keyfile(&signing_key->key,(const unsigned char *)path, passwd);
++ /* make sure cipher is RSA to be consistent with API v1.2 */
++ if(err==0 && !pk_can_do(&signing_key->key,POLARSSL_PK_RSA))
++ err=POLARSSL_ERR_PK_TYPE_MISMATCH;
++ if (err<0) {
+#endif
char tmp[128];
error_strerror(err,tmp,sizeof(tmp));
@@ -200,7 +208,7 @@
belle_sip_object_unref(signing_key);
return NULL;
}
-@@ -494,7 +560,11 @@ belle_sip_signing_key_t* belle_sip_signi
+@@ -494,7 +568,11 @@ belle_sip_signing_key_t* belle_sip_signi
static void belle_sip_signing_key_destroy(belle_sip_signing_key_t *signing_key){
#ifdef HAVE_POLARSSL
More information about the Pkg-voip-commits
mailing list