* more details.
*
* You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
+#include "build-config.h"
+
#include "armor.h"
#include "keystructs.h"
-#include "log.h"
-#include "onak-conf.h"
#include "parsekey.h"
-#include "version.h"
/**
* @brief Line length we'll use for armored output
} else if (c == 63) {
c = '/';
} else {
- log_assert(c < 64);
+ c = '?';
}
return c;
unsigned char t;
int i;
- log_assert(ctx != NULL);
state = (struct armor_context *) ctx;
switch (state->curoctet++) {
{
int i;
- log_assert(c != NULL);
for (i = 0; i < count; i++) {
armor_putchar_int(ctx, ((char *) c)[i]);
unsigned char tmpc;
int i;
- log_assert(ctx != NULL);
state = (struct dearmor_context *) ctx;
*c = 0;
/*
* Print armor header
*/
- putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n") - 1,
- (unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n");
- putchar_func(ctx, sizeof("Version: onak " ONAK_VERSION "\n\n") - 1,
- (unsigned char *) "Version: onak " ONAK_VERSION "\n\n");
-
+ putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n") - 1,
+ (unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n");
+
armor_init(&armor_ctx);
armor_ctx.putchar_func = putchar_func;
armor_ctx.ctx = ctx;