Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Enge
cm
Commits
030c7f2c
Commit
030c7f2c
authored
1 year ago
by
Andreas Enge
Browse files
Options
Downloads
Patches
Plain Diff
Add a missing source file.
* src/ecpp-check.c: New file. * .gitignore: Add new binary.
parent
e08320f8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
src/ecpp-check.c
+59
-0
59 additions, 0 deletions
src/ecpp-check.c
with
60 additions
and
0 deletions
.gitignore
+
1
−
0
View file @
030c7f2c
...
...
@@ -21,6 +21,7 @@ src/classpol
src/cm
src/ecpp
src/ecpp-mpi
src/ecpp-check
aclocal.m4
autom4te.cache/
...
...
This diff is collapsed.
Click to expand it.
src/ecpp-check.c
0 → 100644
+
59
−
0
View file @
030c7f2c
/*
ecpp-check.c - executable for verifying ECPP certificates
Copyright (C) 2024 Andreas Enge
This file is part of CM.
CM is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the license, or (at your
option) any later version.
CM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with CM; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include
"params.h"
int
main
(
int
argc
,
char
*
argv
[])
{
char
*
filename
;
int
res
,
res_pari
;
cm_pari_init
();
evaluate_parameters_ecpp_check
(
argc
,
argv
,
&
filename
);
res
=
cm_pari_ecpp_file_check
(
filename
,
true
,
true
);
if
(
res
==
1
)
printf
(
"The file contains a valid ECPP certificate "
"in the CM format.
\n
"
);
else
if
(
res
==
2
)
printf
(
"The file contains a valid partial ECPP certificate "
"in the CM format.
\n
"
);
else
{
res_pari
=
cm_pari_ecpp_file_check
(
filename
,
false
,
true
);
printf
(
"The certificate in the file is invalid according to the "
"CM specification.
\n
"
);
if
(
res_pari
==
1
)
printf
(
"But it is valid "
);
else
if
(
res_pari
==
2
)
printf
(
"But it is a valid partial certificate "
);
else
printf
(
"It is also invalid "
);
printf
(
"according to the PARI/GP specification.
\n
"
);
}
cm_pari_clear
();
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment