}
/** S-expression for the public part of an RSA key. */
-#define RSA_PUBKEY_SEXP "(public-key (rsa (n %m) (e %m)))"
+#define RSA_PUBKEY_SEXP "(public-key (rsa (n %m) (e %m)))"
/** S-expression for a private RSA key. */
#define RSA_PRIVKEY_SEXP "(private-key (rsa (n %m) (e %m) (d %m) (p %m) (q %m) (u %m)))"
key[j++] = begin[i];
}
key[j] = '\0';
- //PARA_CRIT_LOG("key: %s\n", key);
blob_size = key_size * 2;
blob = para_malloc(blob_size);
ret = base64_decode(key, blob, blob_size);
/* bit 6 has value 0 */
static inline bool is_primitive(unsigned char c)
{
- return ((c & (1<<6)) == 0);
+ return (c & (1<<6)) == 0;
}
static inline bool is_primitive_integer(unsigned char c)
{
if (!is_primitive(c))
return false;
- return ((c & 0x1f) == ASN1_TYPE_INTEGER);
+ return (c & 0x1f) == ASN1_TYPE_INTEGER;
}
/* Bit 8 is zero (and bits 7-1 give the length) */
{
const unsigned char *p = data, *end = data + len;
- /* the whole thing istarts with one sequence */
+ /* the whole thing starts with one sequence */
if (*p != ASN1_TYPE_SEQUENCE)
return -E_ASN1_PARSE;
p++;
if (p >= end)
return -E_ASN1_PARSE;
- /* Skip next integer */
+ /* skip next integer */
if (*p != ASN1_TYPE_INTEGER)
return -E_ASN1_PARSE;
p++;
size_t nr_scanned, erroff, decoded_size;
gcry_mpi_t e = NULL, n = NULL;
- PARA_DEBUG_LOG("decoding %d byte public rsa-ssh key\n", size);
+ PARA_DEBUG_LOG("decoding %d byte public rsa-ssh key\n", size);
if (size > INT_MAX / 4)
return -ERRNO_TO_PARA_ERROR(EOVERFLOW);
blob = para_malloc(2 * size);