gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnutls-dev] Using encrypted OpenPGP keys


From: Mario Lenz
Subject: Re: [gnutls-dev] Using encrypted OpenPGP keys
Date: Tue, 08 Aug 2006 13:04:25 +0200

Hi!

> #define _gnutls_openpgp_raw_privkey_to_gkey(pkey, raw_key) \
> _gnutls_openpgp_raw_privkey_to_gkey (pkey, raw_key, NULL)
> 
> (This should work, shouldn't it?)

No, it shouldn't. But this one seems to work:

#define _GNUTLS_OPENPGP_RAW_PRIVKEY_TO_GKEY(pkey, raw_key, passw, ...) \
  _gnutls_openpgp_raw_privkey_to_gkey(pkey, raw_key, passw)
#define _gnutls_openpgp_raw_privkey_to_gkey(pkey, raw_key, ...)\
  _GNUTLS_OPENPGP_RAW_PRIVKEY_TO_GKEY (pkey, raw_key, ## __VA_ARGS__,
NULL)

It's a dirty hack, but nevertheless it's imo better than adding
half a dozen a_very_long_long_name_indeed_enc functions to the already
existing a_very_long_long_name_indeed ones.

(The version without a password argument should marked as deprecated in
the documentation and removed in a later release, though.)

greez

   Mario





reply via email to

[Prev in Thread] Current Thread [Next in Thread]