[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] =?utf-8?q?svn:_/pecl/gnupg/trunk/_gnupg.c_gnupg=5Fkeylistiterator.c?=
From: Jim_Jagielski <jimjag () php ! net>
Date: 2013-07-17 12:54:49
Message-ID: svn-jimjag-1374065689-330955-1469145976 () svn ! php ! net
[Download RAW message or body]
jimjag Wed, 17 Jul 2013 12:54:49 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=330955
Log:
error checking and ensure we check version
Changed paths:
U pecl/gnupg/trunk/gnupg.c
U pecl/gnupg/trunk/gnupg_keylistiterator.c
Modified: pecl/gnupg/trunk/gnupg.c
===================================================================
--- pecl/gnupg/trunk/gnupg.c 2013-07-17 12:11:24 UTC (rev 330954)
+++ pecl/gnupg/trunk/gnupg.c 2013-07-17 12:54:49 UTC (rev 330955)
@@ -136,12 +136,15 @@
static void gnupg_res_init(gnupg_object *intern TSRMLS_DC){
/* init the gpgme-lib and set the default values */
gpgme_ctx_t ctx;
+ gpgme_error_t err;
gpgme_check_version (NULL);
- gpgme_new (&ctx);
+ err = gpgme_new(&ctx);
+ if(err == GPG_ERR_NO_ERROR) {
#ifdef GNUPG_PATH
- gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_OpenPGP, GNUPG_PATH, NULL);
+ gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_OpenPGP, GNUPG_PATH, NULL);
#endif
- gpgme_set_armor (ctx,1);
+ gpgme_set_armor (ctx,1);
+ }
intern->ctx = ctx;
intern->encryptkeys = NULL;
intern->encrypt_size = 0;
Modified: pecl/gnupg/trunk/gnupg_keylistiterator.c
===================================================================
--- pecl/gnupg/trunk/gnupg_keylistiterator.c 2013-07-17 12:11:24 UTC (rev 330954)
+++ pecl/gnupg/trunk/gnupg_keylistiterator.c 2013-07-17 12:54:49 UTC (rev 330955)
@@ -80,6 +80,7 @@
retval.handle = \
zend_objects_store_put(intern,NULL,(zend_objects_free_object_storage_t) \
gnupg_keylistiterator_dtor,NULL TSRMLS_CC); retval.handlers = (zend_object_handlers \
*) & gnupg_keylistiterator_object_handlers;
+ gpgme_check_version(NULL);
gpgme_new(&ctx);
intern->ctx = ctx;
return retval;
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic