Allow SHA256 and SHA384 data hash for BLISS signatures.
The default is SHA512 since this hash function is also used for the c_indices random oracle.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
* Copyright (C) 2015 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -168,8 +169,11 @@ static int acert()
|
||||
}
|
||||
if (private->get_type(private) == KEY_BLISS)
|
||||
{
|
||||
/* currently only SHA-512 is supported */
|
||||
digest = HASH_SHA512;
|
||||
/* the default hash function is SHA512. SHA1 is not supported */
|
||||
if (digest == HASH_SHA1)
|
||||
{
|
||||
digest = HASH_SHA512;
|
||||
}
|
||||
}
|
||||
|
||||
if (hex)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Copyright (C) 2014 Andreas Steffen
|
||||
* Copyright (C) 2014-2015 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
* Copyright (C) 2015 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -365,8 +366,11 @@ static int issue()
|
||||
|
||||
if (private->get_type(private) == KEY_BLISS)
|
||||
{
|
||||
/* currently only SHA-512 is supported */
|
||||
digest = HASH_SHA512;
|
||||
/* the default hash function is SHA512. SHA1 is not supported */
|
||||
if (digest == HASH_SHA1)
|
||||
{
|
||||
digest = HASH_SHA512;
|
||||
}
|
||||
}
|
||||
if (hex)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
* Copyright (C) 2015 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Copyright (C) 2009 Andreas Steffen
|
||||
* Copyright (C) 2009-2015 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
@@ -104,8 +105,11 @@ static int req()
|
||||
|
||||
if (type == KEY_BLISS)
|
||||
{
|
||||
/* currently only SHA-512 is supported */
|
||||
digest = HASH_SHA512;
|
||||
/* the default hash function is SHA512. SHA1 is not supported */
|
||||
if (digest == HASH_SHA1)
|
||||
{
|
||||
digest = HASH_SHA512;
|
||||
}
|
||||
}
|
||||
if (!dn)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
* Copyright (C) 2015 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -264,8 +265,11 @@ static int self()
|
||||
|
||||
if (type == KEY_BLISS)
|
||||
{
|
||||
/* currently only SHA-512 is supported */
|
||||
digest = HASH_SHA512;
|
||||
/* the default hash function is SHA512. SHA1 is not supported */
|
||||
if (digest == HASH_SHA1)
|
||||
{
|
||||
digest = HASH_SHA512;
|
||||
}
|
||||
}
|
||||
if (!dn)
|
||||
{
|
||||
|
||||
@@ -337,8 +337,11 @@ static int sign_crl()
|
||||
}
|
||||
if (private->get_type(private) == KEY_BLISS)
|
||||
{
|
||||
/* currently only SHA-512 is supported */
|
||||
digest = HASH_SHA512;
|
||||
/* the default hash function is SHA512. SHA1 is not supported */
|
||||
if (digest == HASH_SHA1)
|
||||
{
|
||||
digest = HASH_SHA512;
|
||||
}
|
||||
}
|
||||
|
||||
if (basecrl)
|
||||
|
||||
Reference in New Issue
Block a user