X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=crypt_backend.h;h=b0998d8513f35303243ccd632abc3c0aa46f6377;hp=85008979d4b56a38c26c520bb8868da5cacc48ef;hb=b3c68fd8519a426d6b6285dcb5a865670285e99a;hpb=ee7c57f8dc4edfdc91f2f8657b6429d90ab13e79 diff --git a/crypt_backend.h b/crypt_backend.h index 85008979..b0998d85 100644 --- a/crypt_backend.h +++ b/crypt_backend.h @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2011 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2011 Andre Noll , see file COPYING. */ /** \file crypt_backend.h Non-public crypto interface. */ @@ -11,6 +7,13 @@ /** AES block size in bytes. */ #define AES_CRT128_BLOCK_SIZE 16 -size_t is_ssh_rsa_key(char *data, size_t size); -int check_ssh_key_header(const unsigned char *blob, int blen); +int decode_public_key(const char *filename, unsigned char **blob, + size_t *decoded_size); +int decode_private_key(const char *key_file, unsigned char **result, + size_t *blob_size); +/** Legacy PEM keys (openssh-7.7 and earlier, paraslash.0.6.2 and earlier) */ +#define PKT_PEM (0) +/** OPENSSH keys (since openssh-7.8, paraslash.0.6.3) */ +#define PKT_OPENSSH (1) int check_private_key_file(const char *file); +int find_openssh_bignum_offset(const unsigned char *data, int len);