~ubuntu-branches/ubuntu/hardy/gnupg/hardy-updates

« back to all changes in this revision

Viewing changes to g10/seckey-cert.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-16 16:57:39 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051216165739-v0m2d1you6hd8jho
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 *
16
16
 * You should have received a copy of the GNU General Public License
17
17
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
19
 * USA.
19
20
 */
20
21
 
21
22
#include <config.h>
203
204
        /* now let's see whether we have used the right passphrase */
204
205
        if( csum != sk->csum ) {
205
206
            copy_secret_key( sk, save_sk );
206
 
            passphrase_clear_cache ( keyid, sk->pubkey_algo );
 
207
            passphrase_clear_cache ( keyid, NULL, sk->pubkey_algo );
207
208
            free_secret_key( save_sk );
208
209
            return G10ERR_BAD_PASS;
209
210
        }
211
212
        res = pubkey_check_secret_key( sk->pubkey_algo, sk->skey );
212
213
        if( res ) {
213
214
            copy_secret_key( sk, save_sk );
214
 
            passphrase_clear_cache ( keyid, sk->pubkey_algo );
 
215
            passphrase_clear_cache ( keyid, NULL, sk->pubkey_algo );
215
216
            free_secret_key( save_sk );
216
217
            return G10ERR_BAD_PASS;
217
218
        }